Free web hosts - Appendix K Introduction to XHTML: Part 1 1433

Appendix K Introduction to XHTML: Part 1 1433 8 9 10 11 12 13 14

Welcome to XHTML!

15 16 Fig. K.1 Fig. K.Fig.Fi K.1g. K.11First XHTML example. (Part 2 of 2.) Fig. K. XHTML markup contains text that represents the content of a document and elements that specify a document s structure. Some important elements of an XHTML document include the html element, the head element and the body element. The html element encloses the head section (represented by the head element) and the body section (represented by the body element). The head section contains information about the XHTML document, such as the title of the document. The head section also can contain special document formatting instructions called style sheets and client-side programs called scripts for creating dynamic Web pages. The body section contains the page s content that the browser displays when the user visits the Web page. XHTML documents delimit an element with start and end tags. A start tag consists of the element name in angle brackets (e.g., ). An end tag consists of the element name preceded by a / in angle brackets (e.g., ). In this example, lines 8 and 16 define the start and end of the htmlelement. Note that the end tag on line 16 has the same name as the start tag, but is preceded by a /inside the angle brackets. Many start tags define attributes that provide additional information about an element. Browsers can use this additional information to determine how to process the element. Each attribute has a name and a value separated by an equal sign (=). Line 8 specifies a required attribute (xmlns) and value (http://www.w3.org/1999/xhtml) for the html element in an XHTML document. For now, simply copy and paste the htmlelement start tag on line 8 into your XHTML documents. We discuss the details of the html element s xmlns attribute in Chapter 18, Extensible Markup Language (XML). Common Programming Error K.1 Not enclosing attribute values in either single or double quotes is a syntax error. Common Programming Error K.2 Using uppercase letters in an XHTML element or attribute name is a syntax error.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Leave a Reply