One, labeling problems
For beginners, there is no doubt that the most used tags are div and span, of course, even if only with these 2 tags can write a good-looking page, but why would the web give us so many tags to choose?
From the browser's rendering, the semantic words of the label, it is easier for the browser to render this interface, such as a HTML5 tag heard, browser rendering here is very quick to know, you this is the head, a UL tag, you know is a list, more and more front-end people pay attention to the semantics of the label , we also constantly define more new tags, why we do not use, semantic tags in the work, others take over your code easier to read, in maintenance, faster.
Ii. choice of class and ID
At the beginning of your learning HTML, whether it is a teacher or online teaching has said, try to use class, and to avoid id,id is to be left to JS to use. This problem is same as HTML, since the CSS has given us the ID selector, it has its usefulness, and in CSS3, constantly provide new selectors, we should be reasonable to use the selector, not the entire page is Class,id also has his priority, of course, for the framework of development, That's the class.
Iii. naming of class and ID
Today in the project, I found a member of the code, the most outside called content, and then inside a Div, called content1, and then content1 inside called Content2, I do not know what to say, this call who can read? When we name a little bit of meaning, you say you do not understand English, then you use Pinyin to name also than you Content1,content2 good?
For a personal point of view and for better code writing, please follow me. Web Front End-Hebei