The <title> Element
You should specify a title for every page that you write inside the <title> element (which is a child ofthe <head> element). It is used in several ways:
. At the very top of a browser window (as shown in Figure 2-1)
. As the default name for a bookmark in browsers such as IE and Netscape
. By search engines that use its content to help index pages
Therefore it is important to use a title that really describes the content of your site. For example, if you
have a “contact us” page in your site, do not just use Contact Us for the title. Include your company or
site name. Something like this would be more appropriate:
<title>ScienceZen : Contact Details</title>
Where possible, your title should describe the content of that page; for example, your home page should
not just say “Home page.” It should say what your site is about. For example:
<title>ScienceZen Music: Vintage Guitars, Keyboards, and Drums</title>
Figure 2-1
The test for a good title is whether a visitor can tell what she will find on that page just by reading the
title, without looking at the actual content of the page.
The <title> element should contain only the text for the title; it may not contain any other elements.
For example, you cannot add any instructions as to how the title should be formatted. Figure 2-1 shows
how the content of the <title> element is displayed in the browser window and in the favorites in IE.
The <title> element can carry the following attributes, which are covered in the “Attribute Groups”
section later :
id dir lang xml:lang
0 comments:
Post a Comment