What is the impact of using multiple IDs on a single page? when defining a style in a style sheet, you can define IDs or classes, for example:
ID method: # test {color: #333333}, called on the page
Content
CLASS Method:. test {color: #333333}, called on the page
Content
Id: a page can be used only once, and the class can be referenced multiple times.
Some netizens asked, the id and class seem to be no different. I used multiple IDs on the page to display them normally in IE. What is the impact of using multiple IDs?
A: The first effect is that W3 verification cannot be performed.
On the page display, the current Browser allows you to make this error. It can also be displayed normally with multiple identical IDs. But when you need to use JavaScript to control the p through id, an error will occur.
Id is a tag used to distinguish between different structures and content, just like your name. If two people in a room have the same name, they will be confused;
A class is a style that can be embedded in any structure or content, just like a dress;
The concept is different:
Id is to first find the structure/content, and then define the style; class is to first define a style, and then set to multiple structures/content.
Web standards hope that everyone can write code with strict habits,
For example, you can useBold.But W3C suggestsBecauseMore semantic