MF Web Services logo

HTML Help & Resources

The Document Head

In a certain context, the head is the brain of your document. Inside the head you are able to define how a browser reacts to statements and content inside the body. For instance, you can define languages, document styles and behavior, assign external influences, define the title and description, as well as how browsers or crawlers should classify your document.

The head is also an area where you can experiment, including information that is defined by you, to reference and index your own documents. For example, you could define relevant dates, names, and descriptions of the document, that are only valuable or distinguishable to you, for use in identifying or classifying them. However, there is one basic element of the head tag that needs to be defined every time a document is created - the <TITLE> tag.

The need to include a title tag stems from the fact that search engines use the title of your document to assign relevance or meaning to what's inside the document body. Omiting the title tag can make indexing your documents and pages difficult for crawlers and robots looking to add your document to their index.

For example, lets say you name a created document “ index.html ”, and the name of your website was called www.mywebsite.com . If you omit the title tag in your documents, a potential visitor to your site would not be able to identify what a page is about, just by examing the site and page name - http://www.mywebsite.com/index.html . The only other way for someone to even guess at what they would find, would be to have a descriptive domain name such as www.joes-produce.com which you could infer that the page contains a directory or index of Joe's Produce.

It's always better to define what people will see, as you intend, rather then allowing a search engine or browser determine how your site or pages will look or be displayed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
  <HEAD>
    <TITLE>My First HTML Document</TITLE>
  </HEAD>
  <BODY>
  This is my first HTML document.
  </BODY>
</HTML>

The TITLE should reflect what a visitor to the page will find when they access it. Avoid using short titles like “ Home ” or “ Home Page ” that really don't describe what someone will find if they view the document. The example at left, is exactly the format to use. Notice the words included in the TITLE tag reflect exactly what a visitor to the page would find - the words “ This is my first HTML document ”.

However, the words inside the TITLE tag do not necessarily have to appear inside the document, as long as the TITLE tag describes what a visitor will find when they access it, but for SEO ( Search Engine Optimization ) purposes, and to better your page rank, better to include words that can be related directly to the document.

Move on to the Next Topic - META Data.