We just started our journey in learning the basics of HTML.

Starting With HTML gave you an idea what an HTML is and what are the benefits mastering it.

As already discussed the keywords (Words which have specific meaning in programming) in HTML program are called Tags.

So to further proceeding to HTML we need to study the different tags in HTML.

The tags include the following:

Tagname Description
<b>  </b>         To make the text bold
<i>  </i>           To make the text italics
<u>  </u>        To underline the text
<center>   </center >  To align center
<sup>  </sup> Superscript
<sub>   </sub> Subscript
<strong>  </strong>  To make the text bold
<em>  </em>    To make the text italics
<h1>   </h1> Font size
<h2>  </h2> Font size
<h3>  </h3> Font size
<h4>  </h4> Font size
<h5>  </h5> Font size
<h6>  </h6> Font size
<p>  </p> Paragraph
<title>  </title> Set title of a webpage
<br> To break a line/To go to next line

The above table includes only the basic the tags of HTML.

The remaining tags will be clear as we move on with HTML.

Did you notice that the last tag doesn’t have a closing tag.

Such tags are called empty tag.

Empty tag: Tags which don’t have a closing tag. Eg:<br>

To goto next line we just need to write as <br>. We don’t need any closing tag to goto next line.

Container tag: Tags which have both opening and closing. Eg:  <i> </i>  , <b> </b> etc…

Let us try a HTML program with the above tags:

<html>
<head><title>Using tags</title></head>
<body>
<b> This text is bold    </b>
<i>This text is in italics</i>
<u>This text is underlined</u>
<h1>H1 tag</h1>
<h2>H2 tag</h2>
<h3>H3 tag</h3>
<h4>H4 tag</h4>
<h5>H5 tag</h5>
<h6>H6 tag</h6>
</body>
</html>

It will result as below when we open it in a browser.

HTML website

Advertisements