web standards

In short, web standards can be divided into structure, presentation and behavior. The structure is mainly composed of HTML tags. Perhaps in layman's terms, the tags we write in the page body are all for the structure of the page. The performance refers to the CSS style sheet, and through CSS, the structure tags of the page can be more aesthetically pleasing. Behavior means that the page has a certain interaction with the user, and the page structure or performance changes, mainly composed of js.

W3C puts forward standardized requirements for web standards, that is, some code specifications in actual programming: including the following points

1. For structural requirements: (tag specifications can improve the efficiency of search engines to crawl pages, which is very helpful for SEO )

1). Label letters should be lowercase

2). The label should be closed

3). Tags are not allowed to be nested arbitrarily

2. For css and js

1). Try to use external css style sheets and js scripts. It is structure, performance and behavior divided into three parts, which conform to the norm. At the same time, the page rendering speed is improved and the user experience is improved.

2). The style should use as few interline style sheets as possible to separate the structure from the presentation. The id and class attributes of the tags should be named clearly in the text. The fewer tags, the faster the loading, the improved user experience, the simple code maintenance, and the ease of revision

3 ). Without changing the content of the page, you can provide a print version without copying the content, improving the usability of the website.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326116430&siteId=291194637