We know that when a style table defines a style, you can define the ID or class, for example:
Id method: # test {color: #333333}, call the content on the page
Class Method:. Test {color: #333333}, call the content on the page
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 this Div 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.
The Web standard is intended to be written in strict habits.Code,
For example, you can use the bold text to display the data, but W3C recommends that you use it because it has more semantics.
If you do not pay attention to these details,
So you don't have to transition to XML, and you don't have to learn about web standards, because Web standard applications start from the changes in these small details, otherwise, can I use the current HTML?