[whatwg] Add 'type' attribute to <mark>

Andy Lyttle whatwg at phroggy.com
Sat Nov 1 00:04:29 PDT 2008


On Oct 31, 2008, at 7:57 PM, Ian Hickson wrote:
>>> That's what the "class" attribute is for.
>>
>> What's the difference then between <mark> and <span> then? I mean,  
>> does
>> the <mark> element provide anything that <span> with an appropriate
>> class wouldn't?
>
> A default style when there's no CSS support, support in accessibility
> tools, the ability for search engines to understand what's going on,
> easier round-tripping between editors, simpler rules in CSS and other
> selector-like environments, etc. The usual benefits of semantics.

Are we talking about assigning particular meanings to certain class  
names?  Or are we saying "this is for semantic purposes, but do  
whatever you want with it, because nobody will see it except UAs that  
are applying CSS rules and users who view the HTML source code"?  If  
the former, it's a terrible idea because developers have been working  
with the assumption that there are no reserved keywords so there are  
bound to be conflicts.  If the latter...  it doesn't really mean  
anything, does it?

By the way, I gave a ridiculous example earlier of why defining  
class="footnote" to have semantic meaning would be bad; I got really  
bored and fleshed out that example:  http://phroggy.com/musicalfeet/

-- 
Andy Lyttle
whatwg at phroggy.com







More information about the whatwg mailing list