+ 2
What do you mean by Id can be applied only once per page because I tried it twice and it worked?
5 ответов
+ 4
WITCH. BURN HER! NO BLACK MAGIC...
+ 1
It will overwrite the old cmd
+ 1
I think it also just falls under "best practices" for readable code...
If you give something an id it is to set it apart as unique so you wouldn't want to use that same id again, whereas I could have the same class on multiple elements.
+ 1
If you use same ID multiple time it will wor.k in CSS. But there will be problem in JavaScript.
There will be also problem when you are using <a> tag for scrolling in the page like this.
<a href="#id_name">go to ...</a>
- 1
no were getting this all wrong.
an ID is unique ,its used to divide web pages into sections and can be applied once per page.Just like your body is divided into torso and limb.you can't have two torsos.if we have an ID footer,we can't have two footer.HTML always tolerates wrong syntax.but I don't think it will validate.