[HTML5] Best practice cheat sheet
webmaster at keryx.se
Sun Feb 11 06:42:33 PST 2007
>> 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.)
Yes, I saw that and tried to argue against it.
>> 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
> -- http://www.whatwg.org/specs/web-apps/current-work/#structure0
OK. A nice little list would help, though.
>> 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?
I consider it bad practice.
>> 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. :-)
>> 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.
I used my symbol for "deprecated" (D in Wingdings = Thumbs down) and
I've added the word "discouraged" to the explanatory notes.
P.S. Is there a counter for this list? It would be fun to see how many
that might be listening in on this discussion.
More information about the Help