We know that when a style sheet defines a style, you can define the ID or define the class, for example:
Id Method: #test {color: #333333} to invoke content in the page
Class method:. Test{color: #333333}, invoking content in the page
ID A page can be used only once, class can be referenced multiple times.
A netizen asked, ID and class as if there is no difference, I used a number of IDs in the IE display also normal, with multiple IDs have any impact?
Answer: The first effect is not through the W3 calibration.
On the page display, the current browser also allows you to make this error, with more than the same ID "in general" can also be displayed normally. But when you need to use JavaScript to control the DIV with the ID, there will be an error.
The ID is a label that distinguishes between different structures and content, like your name, and if a room has 2 people with the same name, there will be confusion;
Class is a style that can be set on any structure and content, like a garment;
Conceptually, it's not the same:
The ID is the first to find the structure/content, and then to define the style, class is to define a style, and then set to multiple structures/content.
Web standards want people to use strict habits to write code,
For example: You can use the display in bold, or can be used to display, but it is recommended for everyone, because more semantic
If you do not pay attention to these details, feel indifferent,
Then you have no need to transition to XML, there is no need to learn the Web standard, because the Web standard application is the change from these small details to start, otherwise with the current HTML is not also possible?