Upgrading to the XHTML Document Type
The goal of this lesson is to upgrade the site's HTML code to XHTML, and ensure that all subsequent code you add while working in Dreamweaver is XHTML-compliant. You might be wondering what exactly XHTML is and how it differs from HTML. XHTML is the current standard for HTML, which means that the relationship between the two is historical: XHTML replaces HTML.
Perhaps the most significant change to come with XHTML has little to do with code at all; it's the new conceptual thrust of XHTML, bringing HTML in line with XML, or eXtensible Markup Language. XML is a meta-language—a set of rules that developers can use to develop their own custom language in line with a common standard. XML is markup-based, like HTML, so its syntax should be familiar, as in the following:
One of the central tenets of XML is that the tags describe the content of a document, but not its presentation. Presentation of XML content is handled with a separate type of code (such as CSS, XSLT, or XSL-FO). Previous versions of HTML mixed content and presentation markup. Elements such as lack semantic value. For this reason, they are deprecated, which means that they are discouraged and will be dropped from the standard, but they'll still work for now. They tell the user (or browser) nothing about what was enclosed inside them. Rather, these tags merely tell the browser how to present whatever is enclosed, unlike the
In short, you should use XHTML to describe the structure of your document: headings (,
, etc.), lists (
As you probably know, XHTML looks a bit like HTML. Many of the tags are the same, including , , ,
No comments:
Post a Comment