[HTML5] Best practice cheat sheet
Simon Pieters
zcorpan at gmail.com
Sun Feb 11 03:49:23 PST 2007
Hi,
On Sun, 11 Feb 2007 11:49:27 +0100, Keryx Web <webmaster at keryx.se> wrote:
> 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".
It is a draft so anything can change, but if it's not in the spec at this
time then it probably won't be. The only thing I've heard Hixie say
probably being added is target="". (There have been suggestions to use <u>
instead of <m> also.)
> 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)
"Authors must only use elements in the HTML namespace in the contexts
where they are allowed, as defined for each element. For XML compound
documents, these contexts could be inside elements from other namespaces,
if those elements are defined as providing the relevant contexts."
-- http://www.whatwg.org/specs/web-apps/current-work/#structure0
Simply put, any element that is not defined in the spec is disallowed.
Even if an element is documented for UAs (to foster interoperability) it
may not be allowed for authors to use (e.g. <frameset>, <isindex>). UA
conformance requirements and authoring conformance requirements are
separate.
> 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.
I don't see it being recommended nor discouraged by the spec. Should it be
discouraged?
> And yes, I do use http://simon.html5.org/html5-elements I am confused
> about how definitive that list is though.
Oh, it's not normative at all. I think it is correct 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...
So then the authoring tool is non-conforming.
> 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"?
HTML4 "recommend[s] that authors avoid using all of these features", but
technically all SGMLisms are allowed.
http://www.w3.org/TR/html401/appendix/notes.html#h-B.3.3
> [...]
Cheers,
--
Simon Pieters
More information about the Help
mailing list