+ 7
Can does html document include id with same name more that one? To which element does the function refer in that case?
I know about classes.
8 Answers
+ 8
@Karel: um... how many ids do you have? I only have one id card to identify myself. it's the same for tags. it won't be valid html if they had multiple ids.
+ 6
Point blank straight.... This question has the right answer by Mario Laurisch. There's a reason for classes.
+ 5
there can be multiple ids in a html document, but all of them must be unique and every tag may only have one id.
+ 5
I expanded the question.
+ 5
@Mario, if P tag has id that is same DIV's id?
0
I'm going to try multiple id per a tag. I don't see why this can't be possible.
0
@Mario well, you are right. Accidentaly, I was just thinking about some trick in an environment where I can't use php nor sql ( my job is not IT).