Re: DOCTYPE



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



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)
  • Advice on schema design: Mixing XHTML and a custom vocabulary.
    ... I'm in the process of creating a schema for marking up my personal astronomical observations (yes, I know this has already been done; ... What I would like to do is introduce an <entry> element to enclose a log entry. ... I would like to include, as possible children of certain elements of my own design and yet also allow arbitrary XHTML text to appear, perhaps in constrained locations, for the purpose of making free form notes while having access to the full expressiveness of XHTML. ...
    (comp.text.xml)
  • Re: No properties?
    ... If I process it by going Add an entry then Remove an entry ... And dump XML syntax if you don't use XHTML. ... It would then be a peculiarity of the used DOM implementation ... evangelism: XHTML 1.0 Strict ...
    (comp.lang.javascript)