How to test HTML + CSS through W3C

Source: Internet
Author: User

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.

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.