What are the basic specifications of XHTML coding
This article mainly introduces the basic specifications of XHTML coding, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.
1. All tags must have a corresponding closing tag-TOP
In the past, in HTML, XHTML (refers to div css development) required a strict structure tag structure, all tags must be closed, and the closure must be structurally correct.
For example:
1. General closure
The above commonly used label start and close examples.
2. Multi-level nesting, it is necessary to close errors.
2.1 error demonstration
The above code, div and span obviously close error.
2.2 demonstration of correct closure
If it is a separate and unpaired tag, add a "/" at the end of the tag to close it. For example:
All tag element and attribute names must be lowercase-TOP
Unlike HTML, XHTML is case-sensitive and has different tags. XHTML requires that all tags and attribute names be lowercase. For example, it must be written. Case inclusion is also not recognized, and usually the attribute name "onMouseOver" automatically generated by dreamweaver must also be changed to "onmouseover".
3. All XHTML tags must be properly nested-TOP
Also because XHTML requires strict structure, all nesting must be in order, as we wrote before:
/ b >
Must be modified to:
/ p >
That is, the nesting of one layer must be strictly symmetrical.
All attributes must be enclosed in quotation marks-TOP
In HTML, you don't need to quote attribute values, but in XHTML, they must be in quotation marks. For example:
Must be modified to:
Fifth, put all
Replace the inner dotted line with an equal sign or a space.
Thank you for reading this article carefully. I hope the article "what are the basic XHTML coding specifications" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!