HTML NOTES
HTML NOTES
<Head>
<title>
</title>
</Head>
<Body>
<b> HTML </b> stands for <i> <u> Hyper Text Markup Language. </u> </i> It is used to create a web
pages and applications. This language
is easily understandable by the user and also be modifiable. It is actually a Markup language, hence it
provides a flexible way for designing the
</p>
HTML file is made up of different elements. <b> An element </b> is a collection of <i> start tag, end
tag, attributes and the text between them</i>.
</p>
</Body>
</Html>
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body background="1.jpg">
<br />
<h3 align="center">
<a href="#">HOME</a>
<a href="#">VIDEOS</a>
<a href="#">PORTFOLIO</a>
</font>
</h3>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<h1 align="center">
</font>
</h1>
<h3 align="center">
</font>
</h3>
<br />
<h3 align="center">
<a href="#">
</a>
<a href="#">
</a>
</h3>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>I am normal</p>
</html>
<!DOCTYPE html>
<html>
<body>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
</blockquote>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
</blockquote>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h1 style="background-color:Tomato;">Tomato</h1>
<h1 style="background-color:Orange;">Orange</h1>
<h1 style="background-color:DodgerBlue;">DodgerBlue</h1>
<h1 style="background-color:MediumSeaGreen;">MediumSeaGreen</h1>
<h1 style="background-color:Gray;">Gray</h1>
<h1 style="background-color:SlateBlue;">SlateBlue</h1>
<h1 style="background-color:Violet;">Violet</h1>
<h1 style="background-color:LightGray;">LightGray</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<body>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h2>HTML Buttons</h2>
<button>Click me</button>
</body>
</html>
<!DOCTYPE html>
<html>
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
10
<!DOCTYPE html>
<html>
<body>
</body>
</html>
11
<!DOCTYPE html>
<html>
<body>
</body>
</html>
12
<!DOCTYPE html>
<html>
<body>
</body>
</html>
13
<!DOCTYPE html>
<html>
<body>
</body>
</html>
14
<!DOCTYPE html>
<html>
<body>
</canvas>
</body>
</html>
15
!DOCTYPE html>
<html>
<body>
<label>User Name:</label><br>
<label>User Password</label><br>
<input type="submit">
</form>
<p><b>It will redirect to a new page "action.html" when you click on submit button</b></p>
</body>
</html>
16
<!DOCTYPE>
<html>
<head>
<style>
h1{
color:white;
background-color:red;
padding:5px;
p{
color:blue;
</style>
</head>
<body>
<p>This is Paragraph.</p>
</body>
</html>
17
<!DOCTYPE html>
<html>
<head>
<style>
h2,p{
background-color: #b0d4de;
</style>
</head>
<body>
</body>
</html>
18
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin-left:100px;
</style>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("gradient_bg.png");
background-repeat: repeat-x;
</style>
</head>
<body>
<h1>Hello Javatpoint.com</h1>
</body>
</html>
19
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>
</body>
</html>
20
<!DOCTYPE html>
<html>
<head>
<style>
div {
padding: 50px;
margin: 20px;
border: 6px ridge red;
width: 300px;
float: left;
height: 150px;
p{
font-size: 25px;
#one {
border-radius: 70px;
background: lightgreen;
#two {
background: orange;
#three {
background: cyan;
#four {
background: lightblue;
</style>
</head>
<body>
<div id = "one">
</div>
<div id = "two">
</div>
<div id = "three">
</div>
<div id = "four">
</div>
</body>
</html>
21
The <div> tag defines a division or a section in an HTML document. The <div> tag is used as a
container for HTML elements - which is then styled with CSS or manipulated with JavaScript. The
<div> tag is easily styled by using the class or id attribute. Any sort of content can be put inside the
<div> tag!
22
<!DOCTYPE>
<html>
<head>
<style>
table, th, td {
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
width: 500px;
text-align: center;
font-size: 20px;
</style>
</head>
<body>
<table>
<tr>
<th>First_Name</th>
<th>Last_Name</th>
<th>Subject</th>
<th>Marks</th>
</tr>
<tr>
<td>James</td><td>Gosling</td><td>Maths</td><td>92</td>
</tr>
<tr>
<td>Alan</td><td>Rickman</td><td>Maths</td><td>89</td>
</tr>
<tr>
<td>Sam</td><td>Mendes</td><td>Maths</td><td>82</td>
</tr>
</table>
</body>
</html>
23
<!DOCTYPE html>
<html>
<head>
<style>
table{
text-align: center;
font-size: 20px;
background-color: lightgreen;
th{
background-color: yellow;
td{
background-color: cyan;
#space{
border-collapse: separate;
border-spacing: 45px;
</style>
</head>
<body>
<table id = "space">
<tr>
</tr>
<tr>
<td> 92 </td>
</tr>
<tr>
<td> 89 </td>
</tr>
<tr>
<td> 82 </td>
</tr>
</table>
</body>
</html>
24
<!DOCTYPE html>
<html>
<head>
<title>text-decoration</title>
<style>
h1 {
color: red;
h2{
color: blue;
body {
text-align: center;
p{
font-size: 30px;
#p1 {
text-decoration: underline;
#p2 {
text-decoration: line-through;
#p3 {
text-decoration: overline;
#p4 {
</style>
</head>
<body>
<h2>text-decoration: text-decoration-line;</h2>
<div>
</div>
</body>
</html>
25
<!DOCTYPE html>
<html>
<head>
<title>
</title>
<style>
body{
text-align: center;
#space{
word-spacing: 60px;
p{
color: red;
font-weight:bold;
font-size: 40px;
</style>
</head>
<body>
<div>
<h2>word-spacing: normal;</h2>
<p>
This is a paragraph
</p>
</div>
<div>
<h2>word-spacing: 40px;</h2>
</p>
</div>
</body>
</html>
26
<!DOCTYPE html>
<html>
<head>
<title>
<style>
body{
text-align: center;
#space{
word-spacing: 60px;
p{
color: red;
font-weight:bold;
font-size: 40px;
</style>
</head>
<body>
<div>
<h2>word-spacing: normal;</h2>
<p>
This is a paragraph
</p>
</div>
<div>
<h2>word-spacing: 40px;</h2>
</p>
</div>
</body>
</html>
27
<!DOCTYPE html>
<html>
<head>
<title>
</title>
<style>
body{
text-align: center;
button {
color:lightgoldenrodyellow;
font-size: 30px;
.b1 {
background-color: red;
.b2 {
background-color: blue;
.b3 {
background-color: violet;
}
</style>
</head>
<body>
</body>
</html>
29
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.num{
list-style-type:decimal;
.alpha{
list-style-type:lower-alpha;
.roman{
list-style-type:lower-roman;
.circle{
list-style-type:circle;
.square{
list-style-type:square;
.disc{
list-style-type:disc;
</style>
</head>
<body>
<h1>
</h1>
<h2>
Ordered Lists
</h2>
<ol class="num">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<ol class="alpha">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<ol class="roman">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="disc">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="circle">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="square">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
30
<html>
<head>
<style>
h1{
text-align:center;
}
#rgb{
color:rgb(255,0,0);
#rgba{
color:rgba(255,0,0,0.5);
#hex{
color:#EE82EE;
#short{
color: #E8E;
#hsl{
color:hsl(0,50%,50%);
#hsla{
color:hsla(0,50%,50%,0.5);
#built{
color:green;
</style>
</head>
<body>
<h1 id="rgb">
</h1>
<h1 id="rgba">
</h1>
<h1 id="hex">
Hello World. This is Hexadecimal format.
</h1>
<h1 id="short">
</h1>
<h1 id="hsl">
</h1>
<h1 id="hsla">
</h1>
<h1 id="built">
</h1>
</body>
</html>
31
<html>
<head>
<style>
body
background-color:#ff0006;
h1
{
font-size:80px;
color=red;
text-align:center;
color:red;
table
width: 100%
td
width:25%;
padding: 5px;
cellspacing:10px;
</style>
</head>
<body>
<h1>
Picture Gallery
</h1>
<table>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</body>
</html>
32