[HTML5] Best practice cheat sheet

Keryx Web webmaster at keryx.se
Sun Feb 11 02:49:27 PST 2007


Simon Pieters wrote:
 > <acronym>, <h>, <big>, <center>, <u> and <noembed> are not in (X)HTML5.
 > Framesets will not be in (X)HTML5 AFAIK.
 >

I thought <noembed> was allowed in the HTML serialization. As for the 
rest, are they "not in" as a decided fact, or "not in" as in "not 
documented yet".

The draft actually mentions a lot of "not in" tags like <marquee> and 
even <spacer>, but has no specific list that says what is recommended, 
what is allowed and what is totally forbidden. At times it is ambiguous.

I saw Ian saying on the what-wg list that he will take time in the 
future to "document" frames. If they get "documented", are they in or 
out? (This is why I gave them a question mark - looking like "yet to be 
written" in Wingdings)

On the list I asked why document-write should be documented, and Ian 
asked that it is in use today, therefore it will be documented. But will 
it be recommended? 99 % of the uses for document.write() are bad 
practice and the last percent is for workarounds of MSIE bugs or not yet 
implemented features.

And yes, I do use http://simon.html5.org/html5-elements I am confused 
about how definitive that list is though.

 > (<font> is only allowed for WYSIWYG tools, not for authors.)
 >

Added.

But what if a CMS uses something like TinyMCE or XStandard. If that 
WYSIWYG interface is badly written it may produce <font> tags. The 
author of the CMS has broken the rule, but the page author has not...

I've added a new symbol ("s" in wingdings being a black diamond) meaning
"sometimes available, depending upon serialization or other factors.)


 > The XML declaration and CDATA sections are not allowed in HTML5 (but 
they are allowed in XHTML5). Technically though they are allowed in HTML 
3.2 and HTML4, since the former is just a processing instruction in SGML 
and CDATA sections are also allowed in SGML (not that they are generally 
supported in HTML UAs though).
 >

The new symbol used.

Surely only CDATA is allowed in HTML 3.2 and 4 - right? Is CDATA 
mentioned in the HTML 3.2 or 4.01 spec, or do you just infer that it's 
allowed since it's officially an "application of SGML"?

 > <tfooter> should be <tfoot>.
 >

I thought that was fixed. It has reappeared due to bad version control 
by me. Thanks!

 > <wbr> isn't a soft hyphen, it's a "soft line break".
 >

Oops! I have never used it. Now I know something I did not before!

 > According to the latest WD of XHTML2, the <h1> to <h6> elements are 
present: 
http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-structural.html#sec_8.5.

Once again, I thought that was fixed. I must get my version control 
under control! But they have appeared and disappeared in the spec a lot 
of times - haven't they!

 > <xmp>, <listing> and <plaintext> are deprecated in HTML 3.2.
 >

Fixed

 > <label>, <fieldset>, <legend>, <optgroup>, <button> and <noscript> 
are not in HTML 3.2.
 >

Correct you are. Slarvig är jag! <noscript>  did not even bother 
checking. I just took that one for granted.


Many thanks! Updated version uploaded.


Lars Gunther





More information about the Help mailing list