The differences are as follows:
1. XHTML elements must be nested correctly
2. XHTML elements must be closed
1. Non-empty tags must use end tags.
2. Empty tags must also use end tags, or their start tags must end with />.
(Recommended related video tutorials: html video tutorial)
3. Tag names must use lowercase letters
XHTML specification definition: tag name and attribute pair Case Sensitive.
4. The XHTML document must have a root element.
All XHTML elements must be nested within the root element. All other elements can have child elements. Child elements must be paired and nested within their parent element.
The basic document structure is as follows:
<html> <head> ... </head> <body> ... </body> </html>
Recommended tutorial: html tutorial
The above is the detailed content of What is the difference between XHTML and HTML. For more information, please follow other related articles on the PHP Chinese website!