What is the difference between XHTML and HTML?
XHTML syntax is more rigorous and has certain rules. If you do not follow the rules, errors may occur. But don't worry too much, because the XHTML rule is not too difficult, it is not much different from the HTML4.01 standard.
Note the following:
1. The XHTML tag must be properly closed, even if it is a single tag.
Error: <p> I am a p tag.
Correct: <p> I am a p tag. </P>
Error: <br>
Correct: <br/>
2. XHTML labels must be correctly nested
Error: <div>
Correct: <div> 3. The XHTML tag must be in lower case.
Error: <DIV> I am a div tag. </DIV>
Correct <div> I am a div tag. </Div>
4. All attributes of the XHTML tag must use double quotation marks.
Error: <div style = font-size: 14px> I am a div </div>
Correct: <div style = "font-size: 14px"> I am a div </div>
5. The XHTML document must have the root element.
All XHTML labels must be nested in the