[whatwg] <comment> and <ad> elements

Jukka K. Korpela jkorpela at cs.tut.fi
Sun Sep 4 11:23:09 PDT 2011

4.9.2011 9:14, Shaun Moss wrote:

> I've joined this list to put forward the argument that there should be
> elements for <comment> and <ad> included in the HTML5 spec.

IE recognized <comment> and ignored it in display, so it was like a 
comment declaration (<!-- ... -->). It seems that they dropped support 
at some stage (perhaps in IE 7). So maybe the old effect and usage would 
not disturb much, if you wanted to define a completely different 
semantic meaning for it. I guess what you mean is semantics like 'the 
content of this element is a commentary' (perhaps with a for=... 
attribute to indicate what it is a comment on?). But if introduced, I'd 
still call it <commentary>.

> These are both extremely common features of many web pages;

I have no strong feelings about this, but I don't think commonness is 
sufficient for introducing a markup element. For example, almost all 
HTML documents contain verbs, and yet nobody has proposed a <verb> 
element. Just ease of writing isn't really a good motive, especially 
since any new element would have the problem that some relevant browsers 
do not even let you style an element unknown to them - for example, if 
you wish to style <article>, you need to teach it to IE with a little 
JavaScript. It's simpler and safer to keep using <div class=article> for 
some years, no matter what people might write in the specs.

There's a real argument in favor of <article>: it lets robots detect 
pieces that might be eligible for syndication. What would <comment> be 
useful for?

For <ad>, there's the obvious potential usage of setting

ad { display: none !important }

in a user style sheet. I don't think this possibility would make <ad> 
popular among authors.

Yucca, http://www.cs.tut.fi/~jkorpela/

More information about the whatwg mailing list