An Introduction to Coding Web Pages with XHTML
XHTML, which stands for extensible hypertext markup language, is an extended version of HTML that formats the HTML document in a way that allows an XML reader to parse it. XML is very structured, and that allows the XML parser to be very specific and demanding. That lends itself well to both speed and standardization. With standard HTML, a parser must be very lenient, which leads to slowness and numerous other problems. Another core advantage of XHTML is interoperability. The Web is constantly changing; languages and platforms appear, evolve and fall out of usage suddenly. XHTML is far better suited than HTML to interoperating with new, especially unforeseen, data formats.
An Introduction to Coding Web Pages with XHTML
• This video tutorial introduces the essentials of web page creation in XHTML.
• XHTML basics alone do not build beautiful and complex websites, but they are the foundation.
• Like its forerunner HTML, XHTML is a tag-based markup language for website creation.
• An XHTML tag or element is an individual piece of an XHTML document.
• An XHTML document comprises a tree, or an array, of XHTML elements and other nodes.
• A web browser uses tags and other data to structure information for web-based viewing.
• In an XHTML document, angular brackets denote tags: <html> or <p>.
• Typically, a document uses tags in pairs, which allows them to contain data, including text and other tags.
• Here is an example of pairs: <html> <body> </body> </html>.
• There is no limit, theoretically, to the amount of data that can be contained within an element pair.
• Some XHTML tags are standalone and do not require pairs: <br /> or <hr />.
• An opening or standalone tag may contain attributes.
• Many attributes are global; some are specific to an element.
• Attribute values are always contained in double, preferred, or single quotations: width="10”.
• In the case of <body>, body is the tag, class is the attribute and intro is the attribute’s value.
• A closing tag should always have a forward slash after the first bracket: </body>.
• When a tag cannot or will not contain data, a space and a slash should come before the last bracket: <img />.
More about XHTML
Web developers can apply their knowledge of HTML when learning XHTML. Despite the sophistication of XHMTL, XHTML and HTML are very similar. They both use the core concept of the DOM or Document Object Model, which is a tree structure that represents a page. XHTML and HTML are two different yet similar ways of representing that DOM in markup. Generally, the syntax of XML is more expressive than the syntax of HTML. This allows XHTML to be more powerful and flexible. Typically, however, an HTML parser can interpret and realize a well-formed XHTML document. There are some differences in execution, however, so behavior may be different from what the developer originally intended.

