Make your own free website on

Lesson 2:  The HTML Tags


In order to format an HTML document, we use HTML tags. The HTML tag is case insensitive, <HTML> and <html> are the same. Most tags must start with an open tag and an end with a closing tag. For example: <H1>Heading 1</H1>. However, some of the  tags such as <IMG> do not required a closing tag.

Here is the summary of some basic tags:



<html></html> Tags which create the HTML document.
<head></head> Tags which denote the first part of the HTML document.
<title></title> Tags which define the title of the web page.
<body></body> Tags which define the main contents of the HTML document.
<h1></h1> Tags that indicate the headings. There are 6 headings, from h1 to h6.
<b></b> Tags that display bold text.
<i></i> Tags that display italic text.
<u></u> Tags that underline the text.
<br> Tag that indicate line break. No closing tag is required here.

Now, open the notepad in windows and type the following codes:
[You might also copy the codes and paste them into your notepad]
<title>My sample HTML document</title>
<h1><u>My sample HTML document</u></h1>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
<b> Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<b><i>Bold and italic text</i></b>
<b><i><u>Bold, italic and underlined text</u></i></b>
<h1><i>Italic heading</i></h1>
<h3><u>Underlined heading</u></h3>

To save the file, click on the file menu and select Save As, change file type to All files, save the file as sample1.html in My document. (You might use different file name and folder)

To view the web page, start Netscape communicator or IE and open the above file.

[Click here to see the sample output]


[Back to Main Page]