tailieunhanh - HTML cơ bản - p 28

254 Chapter 5: Building Websites ot h e r h e a D e le m e n t S A few other important head elements need to be discussed. The title element (which has already made several appearances in these pages), the style element, and the base element are described in the following sections along with one of the most useful elements in the document head—the comment. Comments The site visitors don’t see them, and the robots ignore them, but they will be of enormous help to the next web author or programmer who has to work on the page. Comments can even be. | 254 Chapter 5 Building Websites OTHER HEAD ELEMENTS A few other important head elements need to be discussed. The title element which has already made several appearances in these pages the style element and the base element are described in the following sections along with one of the most useful elements in the document head the comment. Comments The site visitors don t see them and the robots ignore them but they will be of enormous help to the next web author or programmer who has to work on the page. Comments can even be placed between the opening html and head elements. This is a good place to add version authorship and update information. It is also a good place to document any dependencies on special resources and provide notes explaining why some coding is different than what would be expected. The title Element It is easy to understand its purpose to provide the document s title. There can be only one title element in a document and it is required. The document title can be different from the title of the page established by a level-one heading or other prominent element. This happens when the current page represents only a section of a larger document or when the titl e element combines the general and the specific. The first and most important guideline for writing good titles is to put the most important words first. The content of the title element is used not only for the title of the window that presents the document as a web page in the browser. It is also the label used for tabbed browser windows. These tab labels can get very short if the user has many open at once. The document title also is used for shortcuts favorites bookmarks and sitemaps. Search engine companies pay special attention to the words at the beginning of the title because people naturally search through indexes and catalogs by title in that manner. It s not necessary to have your domain name in the title element of every page on your site. Robots know what site they are scanning