[whatwg] <comment> and <ad> elements
Shaun Moss
shaun at astromultimedia.com
Sun Sep 4 13:41:47 PDT 2011
Hi Jukka
That's an interesting thought about the <ad> element, and making it
simple to turn them off using CSS. This would indeed dissuade authors
from using it. I'm not sure of the best solution, since <aside> still
seems like a kludge, but it may have to do in this case because of the
nature of ads.
Regarding comments...
A suggested semantic meaning for <comment>: /The content of this element
has been contributed by a website user in reference to an article,
discussion topic, status update, image, video, or some other item of
content./
The idea of a "for" attribute for the comment tag is a great one! Yes,
absolutely perfect. But it would be less useful to use the tag
<commentary>. Everyone knows what <comment> means, it's an extremely
frequent semantic meme across the web (see previous post), and I already
have students already complaining that tag names are getting too long.
Re your comment: "I don't think commonness is sufficient for introducing
a markup element", didn't the algorithm used to discover the new HTML5
tags scan billions of web pages and look for common and recurring class
names and ids? Surely commonness is the primary metric by which new tags
have been determined? Your example with <verb> is not a particularly
accurate analogy - I can't imagine there are too many web pages out
there with <span class="verb"> everywhere, necessitating a tag.
Similarly "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." By this reasoning we shouldn't introduce *any* new tags!! You
might like this: http://code.google.com/p/html5shim/
Thanks!
Shaun
On 2011-09-05 4:23 AM, Jukka K. Korpela wrote:
> 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.
>
More information about the whatwg
mailing list