Creating XHTML 1.0 documents Web Designing

Marking up a document with XHTML is virtually the same as with HTML.Documents are divided into a header and body (except framed documents, which have a frameset area), elements are marked using opening and closing tags, attributes control specific behaviors for those elements, and so on.

However, because it is an XML application, you need to play by the rigid rules of XML markup. What makes XHTML documents different from HTML 4documents is that you need to be absolutely sure that your code is well-formed (i.e., exactly follows the syntax rules), you must declare the DTD that the document uses, and you must use the xmlns attribute to indicate the XML namespace. These issues are discussed in the following sections.

Tools
Because XHTML is still an emerging standard, as of this writing, none of the popular commercial web authoring tools generate XHTML standard documents automatically. This situation should change as XHTML is ushered in as thedefinitive standard, replacing HTML 4.01. In the meantime, Windows and UNIX users can use the W3C's browser and editing tool, Amaya, to generate XHTML documents.

Any tool that is programmed not to rewrite code it doesn't recognize(Macromedia Dreamweaver, Adobe GoLive 4 and higher, and MicrosoftFrontPage 2000) should leave your XHTML-formatted tagging alone. There is an extension to Dreamweaverthat will generate the proper document type and namespace declarations.

Another option is to convert existing HTML documents into XHTML. You could use the command-line utility called Tidy, created by David Raggett of the W3C. Tidy cleans up many aspects of an HTML file, including converting it to well-formed XHTML. Microsoft FrontPage 2002 can also convert selected HTML into well-formed XHTML by clicking on "Apply XML Formatting Rules." Microsoft notes, however, that while selected HTML code is converted, it does not convert the HTML page to a complete XML or XHTML document.

Validation
Because XML is so fussy, it is a good idea to run your XHTML documentsthrough a validator to make sure everything is in order. The W3C's HTML validation service now checks XHTML files for validity.



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Web Designing Topics