and
/b> must be modified to:
/p>
That is to say, the nesting layer by layer must be strictly symmetrical .
4. All attributes must be enclosed in quotation marks ""
In HTML, you do not need to add quotation marks to attribute values, but in XHTML, they must be added quotation marks. For example:
In special cases, you need to use double quotes in the attribute value, you can use ", single quotes can use ', for example:
5. Encode all Any less than sign ( Any greater than sign (>), which is not part of the tag, must be encoded as >
Any ampersand (&), which is not part of the entity, must be encoded as &a m p;
Note: above There are no spaces between characters.
6. Assign a value to all attributes
XHTML stipulates that all attributes must have a value. If there is no value, it will repeat itself. For example:
must be modified to:
7. Do not use "–" in the comment content
" –" can only occur 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:
Replace the inner ones with equal signs or spaces Dotted line.
Some of the above specifications may look strange, but all of them are to make our code have a unified and unique standard to facilitate future data reuse.