2.5. Establishing a Naming Convention for Page Titles

Problem

You need to give meaningful and reliable titles to your web pages so they are easily distinguished from one another in search results and browser history lists.

Solution

Set up a scheme for formatting the content that goes between the <title> tags in your web page code and follow it throughout your site. The title goes in the head section of the HTML code, like this:

	<head>
	…meta tags…
	 <title>page title information</title>
	…CSS styles and other head content…
	</head>

Other guidelines to follow include:

  • Maintain a consistent format.

  • Use specific language.

  • Make page titles unique.

  • Keep page titles brief.

Discussion

The page title is one of the most important and overlooked web page elements. Often without knowing so, web surfers use page titles to get to your web site and move around on it once there. In general, page titles are the linked text that appears in a list of search results (see Figure 2-6). They're also used to keep a running archive of recently visited pages, available through a browser's History or Go menu.

Web designers often neglect writing a useful (or any) page title for a variety of reasons. First, they may be focused on the content and design of a page's main section, and, after completing that, they forget to go back and add a page title. Likewise, their web page editor may have a default page title such as "Untitled" or "Designed with Adobe GoLive," but this title is just as useless as having no title at all, ...

Get Web Site Cookbook 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.