Home  >  Article  >  Web Front-end  >  What is the difference between XHTML and HTML

What is the difference between XHTML and HTML

王林
王林Original
2020-04-20 14:27:413080browse

What is the difference between XHTML and HTML

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 100db36a723c770d327fc0aef2ce13b1 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn