XHTML : Java Glossary
home X words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
XHTML
eXtensible HyperText Markup Language. The HTML to replace HTML 4.01. It has a tighter syntax specification which makes it easier to write a conforming browser or validator. It allows you to mix XML and HTML in the same document. This will allow smarter search engines that take into account the tag context of a piece of data. XHTML is almost identical to HTML 4.01. All tags must nest properly and all start tags must have an matching end tag, even <p> and <br>. All tags must be specified in lower case. You can prepare for XHTML by cleaning up your HTML. XHTML has two big advantages over HTML.
  1. XHTML has a much stricter syntax. If the document is not perfect, the browser will refuse to render it. The advantage is, if your document works on one browser it will work on all.
  2. It is a flavour of xML. This means it is designed for easy data extraction or semantic content to use the latest in term.
Like HTML, there three basic types of XHTML.
  1. XHTML 1.0 Strict - Use this when you want really clean structural mark-up, free of any markup associated with layout. Use this together with W3C’s Cascading Style Sheet language (CSS) to get the font, color, and layout effects you want.
  2. XHTML 1.0 Transitional - Many people writing Web pages for the general public to access might want to use this flavor of XHTML 1.0. The idea is to take advantage of XHTML features including style sheets but nonetheless to make small adjustments to your markup for the benefit of those viewing your pages with older browsers which can’t understand style sheets. These include using the body element with bgcolor, text and link attributes.
  3. XHTML 1.0 Frameset - Use this when you want to use Frames to partition the browser window into two or more frames.
Because more than just browsers can process XHTML, the cognoscenti refer to anything that reads it as a user agent.

You can convert your web pages to XHTML using HTMLValidator Tidy, HTMLTidy, or Amaya.

When you are done, it looks pretty much as it always did with these exceptions:

Converting to XHTML

Even if you don’t flip to XHTML right away, you can prepare for it now by getting your tags all balanced and everything syntax checked.

I am not at all convinced that converting to XHTML is a game worth the candle. It is a huge amount of mindless, pointless busy work. The resulting code is bulkier. The resulting code takes more work to maintain. I don’t see how the end result is really any easier to extract information from as claimed. You can get an idea of what you are in for converting to XHTML by:

  1. Running some sample pages through a converter like HTMLTidy to do the bullwork, like convert <br> to <br />
  2. Prepend a strict XHTML header on your sample pages like this:
  3. Then run your pages through a verifier like HTMLValidator and look at what errors pop out.
XTML has idiotic restrictions, for example that <a tags can’t appear in the body. They must be nested inside some other tag. You could spend months manually “cleaning” just that one problem, all to satisfy some prissy old batchelor at W3C who made up these arbitrary rules.

What I Really Think of XHTML

XHTML is an utterly ridiculous exercise. Its intent is to incovenience humans, and waste thousands of man years of labour to make the files marginally simpler for a computer to parse. That is a form of idolatry. Sacrificing labour to mildly convenience a computer is as silly as worshipping a computer with burnt offerings..

To add insult to injury. when you are done, some browsers, such as IE, will be confused by the XHTML header and a do a worse job of rendering than ever.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 9,130. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/xhtml.html J:\mindprod\jgloss\xhtml.html