Before you start formal content production, we must first understand the specifications for the web standard. Understanding these specifications can help you take less detours and pass the code verification as soon as possible. 1. All tags must have a corresponding end tag before you in HTML, you can open a number of tags, such as
and
without writing the corresponding p> and li> to close they. But this is illegal in XHTML. XHTML requires a rigorous structure, and all labels must be closed. If it is a label that is not pair, it is closed at the label last adds "/" to close it. For example: 2. All tags and attributes You must use lowercase and HTML. XHTML is sensitive to case, and are different tabs. XHTML requires all the names of all labels and properties to use lowercase. For example: must be written in . Calculation inclusions are also not recognized, usually Dreamweaver automatically generated attribute name "OnMouseOver" must also be modified to "OnMouseOver". 3. All XML tags must be reasonably nested. Since XHTML requires a rigorous structure, all nestings must be in order, before we write this code:
p> / b> It must be modified to:
b> / p> means that a layer of nest must be strictly symmetrical. 4. All attributes must be used in HTML "", you can't add quotation marks to the attribute value, but in XHTML, they must be quoted. For example: must be modified to: special case, you need to use double quotes in the attribute value, you can use ", single quotes can be used", for example: 5. Indicates all ), not part of the label, must It is encoded as & gt; no number (&), not part of the entity must be encoded as & amp; Note: There is no space between the above characters. 6. Give all attributes to set a value XHTML to specify all attributes There is a value, but repeat itself without a value.
For example:
must be modified to:
7. Do not make "-" "" - "in the comment content can only occur in the beginning and end of XHTML annotation, that is, they are no longer valid in content. For example, the following code is invalid: Use the equivalent or space to replace the internal dashed lines. The above specification is more strange, but all this is to make our code a unified, only The standard is convenient for future data reuse. Transfer from: Blueidea.com