How to create an XHTML 1.0 standard Web site that meets the standards of the Consortium

Source: Internet
Author: User
Tags object lowercase
XHTML1.0 is the HTML4.0 of the new organization,
is a HTML4.01 revision, the issue is named XHTML1.0
XHTML1.0 requirements are more stringent, with HTML4.01 some differences, to XHTML1.0 standard The following 1-4 items are absolutely necessary and different from HTML4.01 place
The Web page is made using Dreamweaver MX 2004, which can be
"Edit"-"Preferences"-"new file"-"set file to XHTML compatibility"
And then adding HTML, you can start making XHTML pages,
Here's a list of some of the more common mistakes you can make for your reference:
1. All tag element names use lowercase
Error
Correct
Error
Correct
Error

Correct

The above is just for example, is "all" label element names must be lowercase

2.XHTML 1.0 requires all tags to be closed
All no pairs of empty tags must end with/>

and this is the pair.
Errors

Correct

Error
Correct
Error
Correct
Error
Correct
Error
Correct

3. Use of target= "_blank" is not allowed

target= "_blank" can be used in HTML4.01,
But XHTML1.0 is not allowed, you can rewrite it as target= "new"
But the best way is to make a call to JS (solve _blank open a new window does not conform to the standard)
4. All attributes must have a value
XHTML1.0 stipulates that all attributes must have a value, and if not, the attribute must be repeated as a value
Error
Correct
Error s1
Correct S1
Error <TD nowrap>
Correct

5. Symbols that are not part of a tag are encoded
The form contains the following symbols that must also be encoded
< to < Express
> To > Express
& To & Express
The link in the program & also to be replaced by &
Error
Correct


6. Common mistakes in using forms
We are doing a table usually specify width and height, for example:


content

There is no way through, the consortium recommends using CSS to control the height of the tag element
. table{
height:55px;
}


TEXT

But if you use too many tables, it's not a good way to specify a different height in CSS one by one.
In fact, it's very simple to specify the height heights attribute in the cell. Pass the test

<TR><TD height= "" > TEXT

But this is not the standard that the consortium wants, it is recommended to use DIV instead of unnecessary table

7. Proper use of CSS style sheets
Be sure to put it between



Error

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.