Document Head
Document head is one of the two major sections found between <HTML> and </HTML> tags. In the document head section the <TITLE> tag is the only tag that displays the information in the browser window.
The head section of the document begins with the <HEAD> tag immediately after <HTML> tag. The template for the document head will look as under :
<!DOCTYPE HTML PUBLIC
"-//W3C//....">
<HTML>
<HEAD>
<TITLE> Document
Head </TITLE>
<BASE
HREF=".....">
<LINK
HREF=".....">
<META ....>
<ISINDEX ....>
</HEAD>
All these above tags between HEAD are optional (except the <TITLE> tag), but when they are present must be between <HEAD> and </HEAD> tags only, with one exception. HTML 3.2 allows the ISINDEX tag to be anywhere in the document.
Keep the title of your site as meaningful as possible and limit it to 40 characters. Many popular search engines use the TITLE information to index your page. You may therefore like to use this information to attract visitors to your site.
As far as BASE tag is concerned, it is very rarely useful for small sites like a personal homepage. Many browsers automatically treat the document's URL as the base URL and all references to other documents are addressed with reference to this URL. It might still be a good idea to fix the base URL.
The ISINDEX tag is a stand-alone tag that provides a search interface. Mere placing of this tag does not add search functionality to the page. You will need a CGI script or a search engine to implement the search function. When this tag is placed, Netscape prompts "This is a searchable index. Enter search keywords" and Internet explorer prompts "You can search this index. Type the keyword(s) you want to search for". You can change either of these prompts by adding a PROMPT attribute.
The META tag is a versatile tag that allows you to specify meta-information - information beyond what was already provided with other heading tags. You can specify a variety of information with this tag. Some examples are given below:
<META HTTP-EQUIV="Expires" CONTENT="Sun, 24 August 1997 00:00:00 GMT">
This sets the expiration date on the document. A search robot reads this date and knows when to revisit the page to index. If the server does not support HTTP-EQUIV, this is ignored.
<META HTTP-EQUIV="Reply-To" CONTENT="webmaster@mohaniyer.com">
This tag furnishes the name and e-mail address in the document.
<META HTTP-EQUIV="Keywords" CONTENT="HTML Guide, Internet Glossary, DB2, Javascript">
This marks the keywords in the document and makes it easy for the search engines index your site with these keywords.
<META HTTP-EQUIV="Refresh"
CONTENT="n"> or
<META HTTP-EQUIV="Refresh" CONTENT="n;
url_of_next_document">
This is an example of a client-pull, setup in the document using META tag. The first format instructs the document to reload automatically from the server after every "n" seconds. When you create a META tag like this one, ensure that you have provided another exit point from your page. Otherwise, the visitor will be stuck in this page and the only way for them to exit is to close down the browser. The second example loads the document in url_of_next_document after a gap of "n" seconds. This is a nice way of re-directing your visitors to another site. If your url has changed, you may leave a META tag like this in your old page and provide your new url in url_of_next_document. The visitors who visit your old page will be automatically redirected to your new site.