Talk about the understanding of HTML semantics_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:22
Original
1057 people have browsed it

 What is HTML semantics?

HTML tags can be divided into semantic tags and non-semantic tags. For example, table represents a table, form represents a form, a tag represents a hyperlink, and strong label represents emphasis. Typical non-semantic tags include

, , etc. My understanding of HTML semantics is to use as many semantic tags as possible in conjunction with the scene in the page, and use less semantically unsemantic tags such as div and span.

 why? Why semantics?

 1. Nowadays, development is basically carried out by a team. In this case, the code we write should not only be understandable by ourselves, but also easy for others to understand and read. It is important to ensure the maintainability of the code. However, in actual development, due to the flexibility of HTML and the power of CSS, the code written by different people may be implemented in different ways to implement the same interface style. If the implementation is poor, it may be all divs within divs. Such code may be a disaster if maintained. This, I personally think, is the most important factor.

2. Establish good communication with search engines to help crawlers capture more effective information

3. Consider the reusability and portability of the code to facilitate other devices parsing execution. Mobile devices, readers for the blind, etc.

 Personal feelings

 There are not many things you need to learn about HTML and CSS. The threshold for use is relatively low, but it is still difficult to use it well. Using it is pure art. It's like everyone knows Chinese characters, but writers can use these characters to write moving articles, but I can't. . .

For the same page, the HTML written by different people is likely to be different. Personally, I feel that the structure of HTML directly determines the complexity of the CSS selector, image to post-maintenance, and even image performance, etc. In short, it is still difficult to use HML and CSS well.

The above are some of my personal feelings in actual development. Experts are welcome to correct me and communicate.

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!