HTML Full Notes
HTML Full Notes
Versions of HTML:-
1. 1991-HTML-1
2. 1993-HTML-2
3. 1995-HTML-3
4. 1997-HTML-4
5. End of 1997-HTML-5 we use <!DOCTYPE>
6. HTML-5.2(Latest Version).
Basic Code:-
<tag>-Open Tag
</tag>-Close Tag
<!DOCTYPE html>
<html>-Basic tag
<head>-Basic tag
<title>title of webpage</title>
</head>
<body>
</body>
</html>
Lang Attribute:-
Title Tag:-
<title>Page Title</title>
Title denotes web page name.
Heading Tag:-
<h1> to <h6>
Heading tag is heading of the web page.
We have 6 heading tags they are : h1,h2,h3,h4,h5,h6.
<h1>- Heading
<h2>-Heading
<h3>-Heading
<h4>-Heading
<h5>-Heading
<h6>-Heading
Comment Tag:-
HTML comments are not displayed in the browser, they are just for user references.
Paragraph Tag:-
Break Tag:-
The <br> tag inserts a single line break & has no ending tag.
The <br> tag is useful for writing addresses or poems.
Horizontal Tag:-
<hr> is used to draw a horizontal line.
Preformatted Tag:-
<pre></pre>
It prints the statement as it is given inside the pre tag.
Anchor Tag:-
<a href=”www.google.com”>
<a> - tag defines a hyperlink, which is used to link from one page to another.
Image Tag:-
Style Attribute:-
Color
Background-color
Font-size
Text-align
Font-family
Short Quotation:-
AbbrivationTag:-
HTML Bookmark(#):-
If we give # with anchor tag, we can call it on that page itself by using id.
<!DOCTYPE html>
<html>
<body>
<p><a href="#Home">Home</a></p>
<p><a href="#Bio">Bio</a></p>
<h2 id=”Home”>Home</h2>
<h2 id="Bio">BIO</h2>
<p>This is my bio</p>
</body>
</html>
Types of List:-
Unordered List:-
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
Syntax:-
<ul> <li>Coffee</li>
<li>Tea</li>
<li>Milk</li> </ul>
O/P:-
Coffee
Tea
Milk
Ordered List:-
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
Syntax:-
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
O/P:-
1. Coffee
2. Tea
3. Milk
Syntax:-
<ol type="i">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
O/P:-
i. Coffee
ii. Tea
iii. Milk
Description List:-
Example:-
<html>
<head>
<body>
<dl>
<dt>CSE</dt>
<dt>ECE</dt>
</dl>
</body>
</head>
</html>
O/P:-
CSE
- We Like Computers
ECE
- We Like Arduino
Table:-
HTML tables allow web developers to arrange data into rows and columns.
Table Header:-
Sometimes you want your cells to be table header cells. In those cases use the <th> tag instead of the
<td> tag:
th stands for table header.
By default, the text in <th> elements are bold and centered, but you can change that with CSS.
Table Row:-
Each table row starts with a <tr> and ends with a </tr> tag.
tr stands for table row.
Table Cells:-
Syntax:-
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<th>S.No</th>
<th>Name</th>
<th>Dept</th>
</tr>
<tr>
<td>1</td>
<td>Mahesh</td>
<td>BME</td>
</tr>
<tr>
<td>2</td>
<td>Kesav</td>
<td>ECE</td>
</tr>
</table>
</body>
</html>
O/P:-
dotted
dashed
solid
double
groove
ridge
inset
outset
none
hidden
th,td{
border-style :dotted;
Colspan&Rowspan:-
Colspan:-
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
</style>
</head>
<body>
<table style="width:100%">
<tr>
<thcolspan="2">Name</th>
<th>Age</th>
</tr>
<tr>
<td>Mahesh</td>
<td>varan</td>
<td>24</td>
</tr>
<tr>
<td>Kesav</td>
<td>Moorthi</td>
<td>24</td>
</tr>
</table>
</body>
</html>
Rowspan:-
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
</style>
</head>
<body>
<table style="width:100%">
<tr>
<th>Name</th>
<td>Mahesh</td>
</tr>
<tr>
<throwspan="2">Phone</th>
<td>12345</td>
</tr>
<tr>
<td>678910</td>
</tr>
</table>
</body>
</html>
HTML Table Colgroup:-
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
</style>
</head>
<body>
<colgroup>
</colgroup>
<tr>
<th>MON</th>
<th>TUE</th>
<th>WED</th>
<th>THU</th>
<th>FRI</th>
<th>SAT</th>
<th>SUN</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
</tr>
<tr>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
</tr>
<tr>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
</tr>
</table>
</body>
</html>
DivExample:-
<!DOCTYPE html>
<html>
<body>
<p>The P and the DIV elements are both block elements, and they will always start on a new line and take
up the full width available (stretches out to the left and right as far as it can).</p>
</body>
</html>
Span Example:-
<!DOCTYPE html>
<html>
<body>
<p>This is an inline span <span style="border: 1px solid black">Hello World</span> element inside a
paragraph.</p>
<p>The SPAN element is an inline element, and will not start on a new line and only takes up as much width
as necessary.</p>
</body>
</html>
RCB.html:-
<html>
<head>
<title>ImageMap</title>
<body>
</map>
<div id="logo">
</map>
</div>
<div id="cup">
<img src="OIP.jpg">
</div>
</body>
</head>
</html>
Map.css :-
body{
text-align: center;
margin-top: 100px;
height: 2px;
h1{
color: aliceblue;
margin-bottom: 60px;
}
#logo{
padding: 30px;
#cup{
padding-top: 20px;
RCB.jpeg :-
LOGO.png :-
OIP.jpg :-
https://kesavamoorthiconsensus.github.io/Imagemap/Imagemap.html