Web front-end interview--understanding of web standards and the standards

Source: Internet
Author: User

A. Web standards are not a standard, but a collection of standards. Web page mainly by the structure, performance, behavior of three parts, the corresponding standard has a structured standard language has XHTML, XML, the performance of the standard language has CSS, the behavior of the standard has the object model (such as the Web site DOM), Ecmascripe, etc.

The principles of the Consortium:

Web site to pass the standard, you need to pay attention to the following several issues:

1.XHTML 1.0 The correct wording of the declaration of the file category (not lowercase)

A: Over-standard (transitional)

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en"

"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

B: Framework Standard (FRAMESET)

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 frameset//en"

"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >

C: Strict standards (STRICT)

Include the above-mentioned issues, as well as other stricter standards

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en"

Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

2. header file Issues

All the Web header files are changed to the standard form, the following wording

<meta http-equiv= "Content-type" C/>

<meta http-equiv= "Content-language" C/>

<meta name= "keywords" c/>

<meta name= "description" c/>

<title>...</title>

3. target= "_blank" is not allowed

target= "_blank" can be used in HTML4.01, but XHTML1.0 is not allowed.

such as the original code to write:

<a href= "document.html" target= "_blank" >

Open a new window

</a>

Now it needs to be written like this:

<a href= "document.html" rel= "external" >

Open a new window

</a>

This is a method that complies with the strict standard.

The rest of the documentation can be consulted:

Http://wenku.baidu.com/view/3ebbbd659b6648d7c1c74668.html

Second, the DOCTYPE of the document analysis

DOCTYPE, commonly known as document type, is the declaration of a document in markup language, which is intended to tell the standard Universal Markup Language parser what type of document definition (DTD) is used to parse the document. The HTML5 is compatible with all document types

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
Declares that the root element of the document is HTML, which is defined in the DTD that the public identifier is defined as "-//W3C//DTD XHTML 1.0 transitional//en". The browser will understand how to find a DTD that matches this public identifier. If it is not found, the browser uses the URL following the public identifier as the location for the DTD.

Also, be aware that the three document types specified in HTML 4.01, the three types of XML documents specified in XHTML 1.0 are: Strict, transitional, and Frameset.

Web front-end interview--understanding of web standards and the standards

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.