Re: DOCTYPE



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
==================

.



Relevant Pages

  • Re: CGI::Pretty breaking w3c validation
    ... >> possible issues with using XHTML instead of HTML 4.01 strict). ... >> who care about such things can validate your site by themselves. ... XHTML is not a standard. ...
    (comp.lang.perl.misc)
  • Re: CGI::Pretty breaking w3c validation
    ... CGI.pm-generated html is something I'd rather avoid. ... > issues with using XHTML instead of HTML 4.01 strict). ... People who care about ... I do care for proper respect for standards. ...
    (comp.lang.perl.misc)
  • Re: Linux resource site feedback
    ... >> mean Sybren was expressing a preference for using XHTML over HTML. ... >> doesn't care what you use on the backend to deliver the content. ... not feddback on my development style. ...
    (alt.os.linux)
  • Re: DOCTYPE
    ... are valid' are more easily found in XHTML then HTML, care to give an example? ... Entry ... Having to close 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. ...
    (comp.lang.php)
  • Re: XHTML vs HTML
    ... If you can't raionally argue why XHTML should or should not be persued and ... we're talking about XML here. ... the information that HTML doesn't cut it anymore is nuts. ... into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)