There are two types of tags
1. Non- empty tags (container tag)- These type of tags include ON tag <> & OFF tag</>. ON tag is used to open any tag and OFF tag is used to close any tag.For ex:
- <marquee> you are welcome in the HTML world </marquee>
- <font color=yellow size=9> Believe in your self</font>
Every non empty tag has some characteristics ,properties or attributes that define that tag.In above example font is a tag and color for setting the colors and size attributes is used to font size of the text.
- Empty Tag –These type of tags don’t have OFF tag like <hr> ,<br>.
HTML Rules:
- Tags are enclosed in angular brackets like <html>.
- <Br> empty tag doesn’t have off tag </>
- <B> bold the text it is a non empty tag </B>(having off tag</>)
- Every non empty tag for ex. <font> having some properties color ,size etc
- Order for wittinghtml pages
<html>
<head>
<title>…..</title>
</head>
<body>
– – — – – — – – – – –
– – – – – – – – – –
</body>
</html>
********First Html Page********
Copy from here
<HTML>
<HEAD>
<TITLE> First Page </TITLE>
</HEAD>
<BODY bgcolor=silver>
<font color=red size=12>
<center>
<h1> Great Thought </h1>
</center>
</font>
<font size=10 color=#000>
<P Align=”center”>one mistake is done by every person that continuously thinking that he/she will make one
</p>
</font>
</body>
</html>
Note-Write or copy this code in notepad and save it on desktop with .htm or .html extensions like john.html .Click on that file and see the output.
How can we apply comment inside html pages ?
If you want to write some text for learning html but you don’t want to show that text on page then you can use
<!— B tag is used to bold the text –>
for example
<HTML>
<HEAD>
<TITLE> First Page </TITLE>
</HEAD>
<BODY bgcolor=#003300>
<font color= red size=12>
<center>
<b><h1> Internet</h1></b> <!— B tag is used to bold the text –>
</center>
</font>
<font size=10 color=#fff>
<P Align=”justify”>internet is a network of networks .it is a biggest
network in the world
</p>
</font>
</body>
</html>