- HTML code headers:
Every html page must have a header. Header contains important information about the page.
Different tags are used for different sections of a header. Header of an html page is specified by <HEAD> and </HEAD> tags.
<HTML>
<HEAD>
.
.
.</HEAD>
</HTML>
<HEAD>
.
.
.</HEAD>
</HTML>
We will enter header information between tags.
- Page Title:
One of the most important parts of a header is title. Title is the small text that will appear in title bar of viewer's browser. So HTML document will be as below.
<HTML>
<HEAD>
<TITLE>Title of the page</TITLE>
</HEAD>
</ HTML>
</
- Web page body:
Now our web page needs a body in which we will enter web page content. As you may guess we will use these tags:
<BODY> </BODY>
Body will come right after header end tag. So our web page will be something like this
Example:
<HTML>
<HEAD>
<TITLE>My company web page</TITLE>
</HEAD>
<BODY>
Welcome to our homepage. More text here.
</BODY>
<My company web p /HTML>
Now type HTML code in notepad and save it as "page2.html". Then view html file in your web browser.
Body will come right after header end tag. So our web page will be something like this
Example:
<HTML>
<HEAD>
<TITLE>My company web page</TITLE>
</HEAD>
<BODY>
Welcome to our homepage. More text here.
</BODY>
<
Now type HTML code in notepad and save it as "page2.html". Then view html file in your web browser.
In the next section we learn some enhanced features associated with the <BODY> tag.