What is the difference between the strict version and the transitional version of XHTML? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:11:13
Original
1260 people have browsed it

What is the difference between the strict version and the transitional version of XHTML?

If anyone has the strict version of XHTML specification, please share it, thank you!


Reply to the discussion (solution)

Please refer to the poster
http://www.w3school.com.cn/xhtml/xhtml_dtd.asp

The strict version has stricter standards for HTML than the transitional version. However, with the current development momentum of HTML5, this version is unlikely to be applied. In the current widespread web, there are more foreign interfaces than domestic interfaces. With the characteristics of China, you can learn about it, but don't pay too much attention to it. The transitional version is already satisfied with the display of most of the existing pages.

The strict version has stricter HTML specification requirements than the transitional one.

That is, XHTML 1.0 requires the use of XML syntax. In other words, all attributes must use lowercase letters, all elements must also use lowercase letters, all attribute values ​​must be quoted, and you must remember to use closing tags. Remember to use self-closing tags for img and br.
Judging from the content of the specification itself, it is actually the same, there is no difference. The difference is the coding style, because for the browser, there is no problem reading web pages that comply with the HTML 4.01, HTML 3.2, or XHTML 1.0 specifications. To the browser, these web pages are the same and will generate the same DOM. Tree. It's just that people prefer XHTML 1.0 because many people agree with its stricter coding style.
XHTML 1.0 was followed by XHTML 1.1, except that the number after the decimal point was added with a 1, and from a vocabulary perspective, there was nothing new in the specification itself, the elements were the same, and the attributes were also the same. But with XHTML 1.1, the only change is that you must mark your documents as XML documents. When using XHTML 1.0, you could also mark the document as HTML, and that's exactly what we did, otherwise marking the document as XML would probably drive people crazy.
Another difference is the error handling model. The error handling model of XHTML 1.1 and XML is the same. It stops parsing when an error is encountered.
If you mark XHTML 1.1 as an XML document type, assuming you open the document in Firefox, and there is an ampersand (&) in the document that is not encoded correctly, even if this is the only error in the entire page, you will see There will also be a yellow screen and the browser is dead. Firefox will say: "No way, there is an error in the page, you can't see this page.

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