Re: DOCTYPE
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 11:46:32 -0500
Jonas Werres wrote:
I'd be curious as to what 'constructions that are commonly mistakes but are valid' are more easily found in XHTML then HTML, care to give an example?
Sure. This is valid HTML 4.01 Strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Title</title>
<h1>Text</h1>
<p>
<select name="Choice" size="1">
<option>1. Entry
<option>2. Entry
<option>3. Entry
</select>
</p>
Notice missing <head>, <body>, </option>.
Try to check this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Title</title>
<h1>Text</h1>
<p>
a< b
</p>
It is valid. But don't try to remove the space:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Title</title>
<h1>Text</h1>
<p>
a<b
</p>
Ha. Broken.
Want it really bad? Try
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<>
<title//
<p ltr<span></span</p>
</>
is valid. At least there are warnings now at validator.w3.org. Long time there weren't.
Having to close <br /> and stuff are peanut compared to all the SGML stuff XHTML left behind. That's what I meant when I wrote, that the HTML a sane person writes IS mostly XHTML.
Just because the validator doesn't catch all errors doesn't mean you shouldn't use HTML 4.01. I agree with Rik - XHTML is NOT well supported by browsers and should not be used unless it is required for some reason.
What can you say when even W3C doesn't recommend it?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: DOCTYPE
- From: Tony
- Re: DOCTYPE
- From: Jonas Werres
- Re: DOCTYPE
- References:
- DOCTYPE
- From: Jerry
- Re: DOCTYPE
- From: Michael Fesser
- Re: DOCTYPE
- From: Jonas Werres
- Re: DOCTYPE
- From: Rik Wasmus
- Re: DOCTYPE
- From: Jonas Werres
- DOCTYPE
- Prev by Date: time elapsed
- Next by Date: Re: Paypal Payment Pro with certificate use
- Previous by thread: Re: DOCTYPE
- Next by thread: Re: DOCTYPE
- Index(es):
Relevant Pages
|