tags:

views:

39

answers:

1

Hi,

I have some s in my webpage, is there anything wrong with sometimes using the same name as the classname and id? Something like:

<div id='foo' class='foo'>hello</div>

just wondering -

Thanks

+6  A: 

Using identical IDs and class names will not give you any problems as long as the id attribute is unique.

Pekka
Agreed, you can have in your css `div#foo.foo` if you really wanted to
DavidYell
@Pekka: I could not find it but went on for stupid answer without reference. I second you now though. +1
Sarfraz