What is the difference between XHTML and HTML

王林
Release: 2020-05-14 17:10:36
Original
3180 people have browsed it

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 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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template