O'Reilly logo

Learning XML by Erik T. Ray

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.5. XML Application: XHTML

A good place to study the use of links in the real world is HTML (Hypertext Markup Language), the language behind web pages. Hypertext is text with embedded links connecting related documents. It's helped the World Wide Web grow into the wildly successful communications medium it is today.

HTML provides a simple framework for generic documents displayed on screen. It contains a small set of elements that serve basic roles of structuring without many frills. There are head elements to provide titles (<h1>, <h2>, etc.), paragraphs (<p>), lists (<ul>, <ol>), tables (<table>), simple inline elements (<em>, <tt>) and so on. It isn't very detailed, but it's enough to get pages up on the screen for people to see.

We are going to examine a reformulation of HTML called XHTML. It's almost exactly the same as HTML Version 4, but with some restrictions that make it compatible with XML rules. Every XHTML page is a complete XML document that conforms to the XML Version 1.0 standard, and is compatible with all general-purpose XML tools and processors. XHTML documents are also compatible with most HTML browsers in use today, if you follow the guidelines we list below.

There are important benefits to using XHTML over regular HTML:

  • Because XHTML is an XML-conforming standard, XHTML documents can be used with any general-purpose XML editor, validator, browser, or other program designed to work on XML documents.

  • Documents that follow the stricter XML rules are cleaner, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required