RecommendedMORE

Latest case

Latest case

Company News

How to make a web page conforming to the W3C specification

date:2018-12-07
Share
As a website technology developer, it is often from the perspective of their own development to implement the deployment of the website (reading data and development convenience, etc.), rather than from the perspective of website visitors and search engines. Therefore, most websites are not intuitive or convenient in browsing. Especially the current W3C specification is blank in the minds of most web developers. Moreover, Baidu, google, msn, Yahoo and other professional search engines have their own search rules and web page ranking technology, so the website to optimize, the purpose of optimization is only one: meet the standards, meet the standards of spider crawling, more importantly, meet the convenience and ease of use of site visitors browsing. In the following article, AB Dreamweaving Template Network mainly tells about W3C through three aspects!


What is the W3C standard?

W3C is actually World Wide Web Consortium, short for the World Wide Web Consortium. W3C's main responsibility is to determine the future direction of the development of the World Wide Web, and to develop recommendations (W3C is a non-governmental organization, not binding, so only provide recommendations). The HTML 4.01 Specification Recommendation was formulated by W3C. It is also responsible for the development of XML, MathML and other network language specifications.


How to pass the verification of W3C standard?

The steps and methods are as follows:

1. The alt="" attribute of an image must be added to each image, and the alignment attribute is defined by CSS. XHTML 1.0 can't be validated without adding.

2. DTD declarations must be added to each document.

DOCTYPE HTML PUBLIC "-//W3C//DTDXHTML 1.0 Transitional//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

After removal, it can pass validation, but there is a warning: No DOCTYPE found! Checking with default XHTML 1.0 Transitional Document Type.

3. The domain name address of RSS must be the same as the detected address when it passes through XML, otherwise it will make an error.

4. When adding JAVASCRIPT event to the link attribute of the tag, it must be # empty chain, not javascript:; or javascript: void (null);

5. In the same page, the ID of the same name will conflict. So the style defined by ID must be changed to class reference.

<div id="a1">111</div>

<div id="a1">222</div>

This is allowed in CSS design if W3C is not used for detection.

That's the angle of the program can not be the same, CSS can be the same!

It was the same problem before, and then it was changed to class reference.

6. Double or single quotation marks should not be omitted.

A) This refers to attributes, and the standard is double quotation marks ~

Single quotation marks can also be verified.

7. Labels should not be misplaced and nested.

<div class="Case DetaListSS"> Link to the original: <a href='/html/cases/cases_61.html'> Official website </div></a>

This is not allowed.

8. All labels are in lowercase.

9. The label code of FLASH can't be included. It must be implemented by other methods.