O'Reilly logo

HTML, XHTML, and CSS Bible, Fourth Edition by Steven M. Schafer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 the next group of chapters 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 copyright symbol:

<title>Welcome to On Target Games &copy;</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.

Entities are rendered correctly in document titles.

Figure 4-1. Entities are rendered correctly in document titles.

Providing Information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required