How Similar are HTML and XHTML?

by Gareth Powell 13. June 2008 10:27

This is the second installment of a series of blog posts to discuss HTML, XML and XHTML.  An often asked question is “What are the differences between HTML and XHTML?”  But actually, a much more interesting question is “What do HTML and XHTML have in common?”

It’s all about the content

HTML and XHTML are both content markup languages.  That is, in both cases, the most important thing is that they are describing some content being used for communication.  The content is marked up so that computer software – especially browsers – can determine the significance of the content and render it appropriately.

HTML and XHTML have the same rules about content, and the same markup constructions.  Because of its history, HTML allows some outdated markup to be accepted which XHTML does not.

They delegate styling to CSS

Both HTML and XHMTL delegate the styling of pages to CSS.  The same CSS.  There isn’t one CSS for HTML and another for XHTML, although a few of the rules are interpreted slightly differently in the two cases.

They are W3C standards

Both HTML and XHTML are technical recommendations from the W3C – so called “Web Standards”.  Theoretically, any valid HTML or XHTML document should be accepted by all “user agents” out there – from browsers and screen readers to search engine bots.

They have similar appearance

Both HTML and XHTML use SGML as a reference base, and as such, they look very similar, especially when you consider that the valid markup tags in the two languages are the same.  There are superficial syntactic differences, particularly in terms of HTML’s tolerance for tags in different cases, and XHTML’s stricter rules on closing tags.

In Summary

HTML and XHTML are very similar in purpose, intent, layout and appearance.  XHTML has a more consistent syntax, while HTML can be shorter and is more tolerant.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Web Standards

About Aggiorno

Aggiorno RSS FeedsAggiorno is a unique knowledge-encapsulation platform that can make any website a valid, findable, accessible, standards compliant one. Read on

IE8 Compatibility Wizard

Automatically upgrades your website to render correctly in IE8!

Internet Explorer 8 Compatibility Wizard

Get it today!

RecentComments

Comment RSS

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Disclaimer

The opinions expressed here in are my own personal opinions and do not represent my employer's view in anyway

Copyright 2008


ArtinSoft Corporation ArtinSoft is Microsoft Certified Partner ISV/Software Solutions and Microsft Visual Studio Partner

With over fifteen years of experience, ArtinSoft has proven to be a key player in software evolution, by allowing customers from all over the world to ensure business continuity and compliance through software migration solutions and developer tools created upon principles of artificial intelligence. At present time, ArtinSoft Corporation remains a private firm in constant growth through a strategic partner network. Read More...