Chapter 4. The HEAD Elements

IN THIS CHAPTER

  • Specifying the Document Title

  • Providing Information to Search Engines

  • Setting the Default Path

  • Script Sections

  • Style Sections

  • Specifying Profiles

  • Background Color and Background Images

You have seen what various pieces make up HTML documents and how they all fit together. In Chapter 5 through Chapters 14 you will see how each individual piece is formatted and placed in the document. This specific chapter deals with the elements in the head section of the document.

Specifying the Document Title

The <head> element of an HTML document contains several other elements, including the document title. The document title is delimited between <title> tags and can include any character or entity. For example, consider the following <head> section, which includes a registration mark:

<title>Welcome to On Target Games &reg;</title>

This title shows in the title bar of Internet Explorer, as shown in Figure 4.1.

While it is useful to have the title of your document in the title bar of the client's browser, the title is used in several other locations as well. It is used as the default shortcut/favorite name in most browsers, linked to in most search engines, and so on. As such, you should always include a title for your documents, and make it as descriptive (but concise) as possible.

Providing Information to Search Engines

Your document's <head> section can also include <meta> tags. These tags are not rendered as visible text in the document; they are used to pass ...

Get HTML, XHTML, and CSS Bible, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.