Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

XHTML vs HTML- Why use XHTML?

In general you can get away with more short-cuts, and possibly even less work by using HTML rather then XHTML - nevertheless, we still recommend making an effort to use XHTML code in your Website because of all the long term benefits!

Differences Between XHTML and HTML

Both HTML 4 and XHTML 1.0 use precisely the same elements, attributes, and values. The difference between HTML and XHTML is in their respective syntax - the main differences are discussed in this section.

  • XHTML requires that all Webpages contain the <html>, <head>, and <body> elements, as well as the DOCTYPE declaration, where as in HTML they are not required.
  • XHTML insists on having closing tags for every element, even empty ones, where as HTML often lets you omit them.
  • HTML requires that all attributes be enclosed by quotation marks, where as HTML lets you omit quotation marks, but only around attribute values which consist of only letters, numbers and these characters: - (dash), . (period), _ (underscore) and : (colon).
  • XHTML is case sensitive, where as HTML is not case sensitive. Furthermore XHTML requires that all enumerated attribute values be lower case.

Why use XHTML?

XHTML's more strict syntax rules has many benefits. By adhering to a more consistent, well structured format, your webpages can be easily parsed and processed by software applications. It also makes your website more easy to maintain, edit, convert and format in the long run. XHTML adopts official XML standard syntax, and is a newer technology with many benefits described in the XML Tutorial section. Alternate ways of accessing the Internet are constantly being introduced. The XHTML family is designed with general user agent interoperability in mind, such as mobile devices, new Web browser software, etc.

Since XHTML is an official standard of the World Wide Web Consortium (W3C), your website will more likely render correctly in more browsers then should you choose to use non-standard HTML tag sets, which reduces site maintenance work, and improves the overall usability of your site.

Finally, Document developers and user agent designers are constantly discovering new ways to express their ideas through new markup. In XML, it is relatively easy to introduce new elements or additional element attributes. The XHTML family is designed to accommodate these extensions through XHTML modules and techniques for developing new XHTML-conforming modules (described in the XHTML Modularization specification). These modules will permit the combination of existing and new feature sets when developing content and when designing new user agents.

Email & Web Hosting

We have the best service for exchange 2007 hosting and coldfusion hosting especially for small business. See why our Microsoft Exchange 2007 hosting is the right business email for you.

Start Of Section: XHTML Tutorial Start of Section:
XHTML Tutorial
Next Page:
XHTML Introduction
Next Page: XHTML Introduction
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.