<br /><img height=80 alt=Web designer src=../images/logo_w3cn_200×80.gif width=200 />
2. All the names of the elements and attributes of the tag must be lowercase.Unlike HTML, XHTML is case sensitive, and <title> and <TITLE> are different tags. XHTML requires that all tags and attribute names must be in lowercase. For example: <BODY> must be written as <body>. Case inclusions are not recognized. Usually, the attribute name onMouseOver automatically generated by dreamweaver must also be modified to onmouseover.
3. All XHTML tags must be reasonably nested Also because XHTML requires a rigorous structure, all nesting must be in order. The code we wrote like this before:<p><b></p>/b>must be modified to: <p><b></b>/p>
That is to say, the nesting layer by layer must be strictly symmetric.
4. All attributes must be enclosed in quotes. In HTML, you can not have to quote attribute values, but in XHTML, they must be quoted. For example:<height=80> Must be modified to: <height=80>
In special cases, you need to use double quotes in the property value, you can use single quotes, for example:
<alt=say'hello'>
5. All < and & special symbols are expressed in code Any less than sign (<), which is not part of the tag, must be encoded as <Any greater than the sign (>), which is not part of the tag, must be encoded as & gt;
Any & number (&), which is not part of an entity, must be encoded as &
Note: There are no spaces between the above characters.
6. Assign a value to all attributes XHTML stipulates that all attributes must have a value, and those without values will be repeated themselves. For example:<td nowrap> <input type=checkbox name=shirt value=medium checked>
Must be modified to:
<td nowrap=nowrap> <input type=checkbox name=shirt value=medium checked=checked>
7. Don't use it in the comment content – – Only happens at the beginning and end of XHTML comments, that is, they are no longer valid in the content. For example, the following code is invalid:<!-Here is the comment--Here is the comment->
Replace the dotted line inside with an equal sign or a space.
<!-Here is the comment====================Here is the comment->
Some of the above specifications seem strange, but all of this is to make our code have a unified and unique standard for future data reuse.