+ 1
Id vs Class
Hello, so they say that in an html code, the "id" is unique -couldn't be used more than once, and the "class" notion isn't, so you can use it how-much-ever you wanted to. I basically see this explanation as unclear since I've tried using the same "id" in different tags e.g: <p id="test">...</p> , <div id="test">...</div>. This ended up having both tags affected by the modifications of #test in my css file...How Come? Isn't the ID unique? I'd like a detailed explanation of the diff. between an ID & a class.
5 Respostas
+ 5
The lessons are quite good too.
https://www.sololearn.com/Course/HTML/?ref=app
+ 2
https://css-tricks.com/the-difference-between-id-and-class/
+ 1
Thanks, excellent article!
+ 1
No problem :)
0
Yes they are, but not as clear.