The Many Flavours of HTML
A Long, Long Time Ago...
The first version of HTML was created by the web's inventor, Tim
Berners-Lee, and was loosely based on an existing standard
called SGML (Standardised General Markup Language). This very
first version didn't have an img tag, which meant that no
graphics at all could appear on web pages. Berners-Lee
informally extended the language, but didn't standardise it.
As the web grew, the lack of standardisation started to make it
difficult for web browsers to interact - one web browser might
have a new tag that others didn't support, meaning that people
would see pages completely differently depending on which
browser they used. In 1995, HTML was formalised as a standard
named HTML 2, which was the version that the first mass-market
web browsers were based on.
As they extended the standard further, an HTML 3 was introduced
in 1997 to keep up-to-date. HTML 4 was introduced later that
year as an effort to clean up the standard, making it clear that
some tags should no longer be used. Apart from a few minor fixes
in 1999, this is the version of HTML that is still in use today.
DHTML
Parallel to this development, though, other languages were being
developed that could be included in HTML documents: languages
like Javascript (for interactive pages) and CSS (for styling).
DHTML (Dynamic HTML) was the name given to the combination of
HTML and these technologies. To put it simply, HTML is for web
pages while DHTML is for 'web applications'. As people start to
do more and more things on the web that they used to do with
separate programs, DHTML techniques are becoming ever-more
popular.
XHTML
Sometimes considered 'next-generation HTML', XHTML is a stricter
version of HTML that makes it follow XML standards. XML
(eXtensible Markup Language) is a standard for HTML-like
languages that is being used for more and more purposes,
including configuration and sharing data.
Stripped of the technical talk, XHTML can basically be thought
of as a stricter version of HTML. Where HTML is often messy and
hard to test, XHTML is strictly standardised and can be run
through automatic 'validators' that will point out any errors
you've made. This improves cross-browser compatibility and makes
web pages much easier to maintain, since it mostly forces
information on the style of the page to be separated from the
actual text of the page.
XHTML exists in a few different versions: there is a
'transitional' version, which lets you keep using some old
practices from HTML4, and there is a 'strict' version, which is
the one you need to use to get most of XHTML's benefits.
The web's standards body, the W3C, runs an HTML validator at
validator.w3c.org.
What Does All This Mean to Me?
You might be wondering at this point why exactly you need to
know about the different kinds of HTML. Well, as ever, the
answer is that you need to choose one before you start
developing your website. You have to be aware of which versions
your tools support to know whether your tools can work together,
and you should aim to pick the kind of HTML that will be most
suitable for your site.
At the moment, XHTML is recommended for most websites, simply
because it makes the whole process much easier, especially if
you use an editor that saves to XHTML automatically. The only
situation in which you should really keep using HTML4/DHTML is
if you're designing a web application instead of a web page. If
your site is, like 99% of the sites on the web, designed to give
information more than it is designed to do anything else, then
you should be using XHTML, preferably the strict version.
About the author:
Information supplied and written by Lee Asher of Eclipse Domain
Services
Domain Names, Hosting, Traffic and Email Solutions.