Web design software - 1434 Introduction to XHTML: Part 1 Appendix K
1434 Introduction to XHTML: Part 1 Appendix K An XHTML document divides the htmlelement into two sections head and body. Lines 9 11 define the Web page s head section with a head element. Line 10 specifies a title element. This is called a nested element, because it is enclosed in the head element s start and end tags. The headelement also is a nested element, because it is enclosed in the html element s start and end tags. The title element describes the Web page. Titles usually appear in the title bar at the top of the browser window and also as the text identifying a page when users add the page to their list of Favorites or Bookmarks, which enable users to return to their favorite sites. Search engines (i.e., sites that allow users to search the Web) also use the titlefor cataloging purposes. Good Programming Practice K.3 Indenting nested elements emphasizes a document s structure and promotes readability. Common Programming Error K.3 XHTML does not permit tags to overlap a nested element s end tag must appear in the document before the enclosing element s end tag. For example, the nested XHTML tags
cause a syntax error, because the enclosing head element s ending tag appears before the nested title element s ending tag. Good Programming Practice K.4 Use a consistent title naming convention for all pages on a site. For example, if a site is named Bailey s Web Site, then the title of the main page might be Bailey s Web Site Links . This practice can help users better understand the Web site s structure. Line 13 opens the document s body element. The body section of an XHTML document specifies the document s content, which may include text and tags. Some tags, such as the paragraph tags (and
) in line 14, mark up text for display in a browser. All text placed between the
and
tags form one paragraph. When the browser renders a paragraph, a blank line usually precedes and follows paragraph text. This document ends with two closing tags (lines 15 16). These tags close the body and html elements, respectively. The ending