Front-end basic web page standards

Web standards are a collection of standards developed by the W3C and other standardization organizations. W3C (World Wide Web Consortium) is the most famous international standardization organization.

Why web standards are needed:

In addition to allowing different developers to write more standard and uniform pages, following web standards has the following advantages:

1. Let the development prospects of the web be broader

2. Content can be accessed by a wider range of devices

3. Easier to be searched by search engines

4. Reduce website traffic costs

5. Make the website easier to maintain

6. Improve page browsing speed

What constitutes a web standard

It mainly includes three aspects: structure, presentation, and behavior.

Structure : The structure is used to organize and classify the elements of the web page. At this stage, I mainly learn HTML.

Presentation : Presentation is used to set the layout, color, size and other appearance styles of web elements, mainly referring to CSS

Behavior : Behavior refers to the definition of web page models and the writing of interactions. At this stage, I mainly learn javascript

The best experience solution proposed by Web standards: separation of structure, style, and behavior.

Simple understanding: structure is written in HTML files, performance is written in CSS files, and behaviors are written in JavaScript files.

The three elements of the web standard are like the picture below. The beautiful parrot that has been flying all the time must be composed of three elements.

HTML like body

CSS similar appearance decoration

JS (JavaScript) similar actions

In comparison, structure (HTML) is the most important of the three

Guess you like

Origin blog.csdn.net/weixin_53466908/article/details/123649064