by
Don Herion For those web
developers anxiously awaiting the availability of HTML 5 your wait is over. It's
called XHTML 1.1.
XHTML?
That's right. Although HTML as a web development language
has been incredibly successful it has hit a brick wall for future growth. You
could say HTML 4 is the last propeller driven aircraft to be built and XHTML 1.1
the first jet powered aircraft created for web developers.
That sounds good. But what does it mean? Just what is XHTML?
XHTML
1.1 is the first step toward a modular and extensible Internet based on XML (extensible
Markup Language). Basically, XHTML is the connection or bridge between the present
HTML 4 world and new, larger XML universe. Okay, that makes
sense. So, what's the deal with XML? Well, XML is a simplified
subset of SGML (Standard Generalized Markup Language) that is easily readable
by both people and computers. XML is a more powerful syntax for representing information,
such as databases. Customizable tags enable the manipulation of complex data between
applications and institutions. Another advantage of implementing XML is the opportunity
to create a new generation of browsers that will be leaner, faster and less likely
to crash.
All right, XHTML 1.1 is HTML 5.0 with some XML bells
and whistles. That sounds great. But how is it better?
XHTML
will be more extensible than static HTML 4 and it is leaner for the rash of new
non-PC platforms like Palm-type computers, televisions, telephones, etc. Because
these platforms lack the power of desktop computer systems they have trouble accommodating
the less forgiving and cumbersome HTML technology.
Hmm, so
far, so good. What else can you tell me about XHTML?
Well,
the rules for using XHTML are more stringent than with HTML. For example, all
tags and attribute 'names' must be lowercase. However, attribute 'values' can
be uppercase but they must be in quotes. All elements must have close tags. For
example, a <p> tag must have the close tag </p>. Empty tags like <br>
must be terminated with an XML "empty tag" slash like this <br />. All tags
must nest in a proper sequence.
| Sample
of proper XHTML syntax | |
<p><b>Title</b></p> <p>First Paragraph</p>
<p>Second Paragraph</p> <br> <img src="/images/zebra.gif"
alt="ZEBRA" width="20" height="100" border="0"
align="LEFT"/> <br /> | |
As you can see the syntax rules are less forgiving than
with current HTML browsers.
I can do that. What else?
The
basic document structure is similar with HTML. A typical web page is broken up
into 3 parts, the doctype, the head and the body. Here is a sample XHTML document.
As you can see its not different from HTML.
|
Sample
of XHTML format
|
|
<!doctype
html public ----->
<html>
<head></head>
<body></body>
</html>
|
|
It looks
simple enough. So, when is XHTML 1.1 going to be the standard web development
language?
I was afraid you were going to ask that. Although
the W3C (World Wide Web Consortium) has released XHTML 1.1 months ago it's going
to take several years for the transition to be completed. My advice for the moment
is to start implementing the XHTML 1.1 syntax rules now. Todays browsers have
no problem reading XHTML pages. The W3.org
web site has a cool program called 'HTML Tidy' that can convert existing HTML
documents into XHTML ready documents. You might want to check it out.
|