Re: DOCTYPE
- From: Jonas Werres <jonas@xxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 17:30:26 +0100
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.
.
- Follow-Ups:
- Re: DOCTYPE
- From: Jerry Stuckle
- Re: DOCTYPE
- References:
- DOCTYPE
- From: Jerry
- Re: DOCTYPE
- From: Michael Fesser
- Re: DOCTYPE
- From: Jonas Werres
- Re: DOCTYPE
- From: Rik Wasmus
- DOCTYPE
- Prev by Date: Re: Image Pan and Zoom script
- Next by Date: Re: DOCTYPE
- Previous by thread: Re: DOCTYPE
- Next by thread: Re: DOCTYPE
- Index(es):
Relevant Pages
|