Experience in W3C XHTML1.0 verification on websites

Source: Internet
Author: User

This article is a Web jx.com user who has some experience in W3C XHTML1.0 verification during website updates and adjustments.

Nine issues that need to be paid attention to through the W3C XHTML1.0 standard are summarized:

1. in <div class = tzh> I am TZH! </Div> what are the errors in this statement?

Punctuation. This is actually the most easily overlooked problem. In fact, this error is caused by a small pair of quotation marks. Although many browsers still correctly recognize rendering without quotation marks. However, it is impossible to pass the strict W3C XHTML international standard. Remember that the equal sign must be enclosed by quotation marks. Correct syntax: <div class = "tzh"> I am TZH! </Div>

2. in <SPAN class = "tzh"> TZH is me! </SPAN> what are the errors in this statement?

Note the case sensitivity. This is the same as the first issue. It is a very easy-to-ignore detail issue. In W3C standards, uppercase letters are definitely not allowed. I still remember that when I was detecting a piece of javascript code, the onLoad I wrote at a glance was also judged to be incorrect, the reason is that L cannot be capitalized. Correct syntax: <span class = "tzh"> TZH is me! </Span>

3. in <p> I am TZH! </P> <br> <p> TZH is me! </P> what are the errors in this statement?

<Br/> tag issues. For a forced line feed label <br/>, many new users cannot tell the difference between it and <br>, even in the FCKeditor, A <br> may appear from time to act as <br/>. Although many browsers can automatically correct errors, <br> is used as <br/> recognition. However, it is recommended that you use Dreamweaver to edit the file. When you press Ctrl + Enter, the file is automatically written to the previous file. <br/>. Correct syntax: <p> I am TZH! </P> <br/> <p> TZH is me! </P>

Iv.
Note the punctuation marks followed by the end of a tag. Many tags cannot be followed by special punctuation marks. For example "~ "Wave number, but you have to ask, how can I use it? Use the ISO Latin-1 Character Set (ISO Latin-1 Character Set). Here, find "~". The decimal encoding of the character set corresponding to the Tilde is ~, Then use this decimal encoding instead ~ The Tilde. Remember that the last semicolon cannot be lost. In the ISO Latin-1 Character Set, Named entities are given the highest priority, while Decimal codes are followed, that is, when a symbol has both the decimal encoding and the named object, the named object is preferentially used instead of the decimal encoding.

5. What are the errors in the <form id = "54tzh"> </form> statement?

Pay attention to the special situations of id and class. The W3C XHTML1.0 Standard specifies that the first character in id or class cannot be a number or a letter. Correct syntax: <form id = "tzh45"> </form>

6. What are the errors in the statement?

note. The W3C XHTML1.0 Standard specifies that the label must contain the alt element. Correct syntax:

7. What are the errors in the <script language = "JavaScript"> statement?

<Script> note. W3C XHTML1.0 standard stipulates that the label must contain the type element. Correct syntax: <script language = "JavaScript" type = text/javascript>

8. in <div>
Note that the start and end sequence of the tag corresponds. Correct syntax: <div>
9. What problems should I pay attention to in addition to the above?

Pay attention to special suits. For example, some special tags such as <dl> <dd> <ul> <li> are indispensable in the set sequence. The <dl> <dd> <ul> <li> labels must be completely written in sequence. There are many similar examples.

Note that the tag is not enabled. The so-called unopened error is detected by W3C. The error is not open, which means that it is not opened. To understand the meaning in Chinese, there is no beginning or end. Generally, this error occurs because a piece of code is deleted when it is modified, but the end or start label is not taken into account.

Summarize some experiences related to W3C CSS standards:

I. Use less remedies. Similar to break-word, z-index, manual layering, vertical alignment, and so on, it is best to use less, because not all browsers support it and it is very difficult to pass W3C detection.

2. The center is not a float value. Many new users mistakenly think of the center value as a float value, but this is not the case. Center is only the value of text-align.

3. Alignment cannot contain two values. Many new users fill in two values in float or text-align, for example, float: left top. This is not allowed and cannot be identified by the browser.

4. Do not customize the color of the scroll bar. Many browsers cannot normally recognize the scroll bars of custom colors, and many custom colors cannot pass W3C.

5. Separate scroll bar settings. Currently, overflow-x (horizontal scroll bar) or overflow-y (vertical scroll bar) are often used. When this is set, it is often found that not all clients have an effect, it is best to set both the body and html when setting. However, CSS is not supported by CSS2.1 (CSS2.1 supports overflow and defines horizontal and vertical scroll bars at the same time). It is not supported by css3. Use as few as possible.

6. If the background and color are the same, a warning is triggered. For more information, refer to the related articles of webjx.com.

Related Article

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.