Home > Web Front-end > HTML Tutorial > Detailed introduction of various versions of html doctype

Detailed introduction of various versions of html doctype

高洛峰
Release: 2017-03-28 11:44:44
Original
1578 people have browsed it

The difference between

HTML 3.2 -- January 1996, W3C Recommendation

·HTML 4.0 -- December 1997, W3C Recommendation

·HTML 4.01 -- December 1999, W3C Recommendation

·HTML 5.0 -- August 2008, W3C working draft

HTML 2.0 is an outdated version of HTML, probably in 1996.

HTML3.2 was probably in 1997, an era without styles. Some display methods are implemented using attribute tags or attributes. Such as: 〈CENTER〉ALIGN=CENTER, etc. Some are left over from later versions.

XHTML is the latest version of HTML. HTML tutorial

But HTML 5 is not formulated directly by W3C, but is formulated by WHATWG, a different browser manufacturer.

Validation issues on W3c

An element appears in In a specification that is later than the HTML version declared by doctype, the element will not be interpreted and rendered? No, of course not! It will still interpret and render the element, don't forget Burstahl's law, don't forget robustness. The browser must be open when receiving. Therefore, it will not check any format type, while

validator

will (w3c's), the validator only cares about the format type. This is the real reason why doctype exists.

Some differences between W3c standards and browser display

This is also why elements such as center, font, etc. that are not supported by some versions of w3cshool can still be displayed in xhtml 1.0 and html5 There is a reason for its original function. -----Browser fault tolerance. That is Burstahl's law, also known as the law of robustness. Its main meaning is "conservative when sending, open when receiving." Browser manufacturers understand that they must support all versions, and they will not stop supporting previous versions of HTML just because everyone now writes websites in HTML4.1 or HTML5. The reason is simple, browsers must be backwards compatible. This is the browser's "open on receive" spirit.

"Be conservative when sending" is a warning to web developers. Your HTML code should be written to comply with the standards as much as possible, so that it can be easily parsed by others (browsers).

Why should it pass the w3c Verification (many do not pass w3c verification) If you follow W3C standards when designing your pages, then congratulations: you have completed half of the SEO (search engine optimization) work! Why would I? So where is the other half of the work? Will you reconstruct your website according to W3C standards?

XHTML

XHTML 1.0 uses

XML

to re-represent HTML 4.01.

As a W3C recommendation, XHTML 1.0 was released on January 20, 2000. Xhtml is a new concept with well-organized lines introduced based on xml. It is a stricter and purer html;

Xhtml difference 1: Xhtml element names and attributes must be case-sensitive. ##                                                                                                                                                                                                                                                         The empty tag must be closed. Attribute quotes cannot be omitted

The W3C standardization process is divided into 7 different steps

Style sheets can describe how the document is displayed, pronounced, or printed 4.

Daniel explain

XHTML 1.0 and HTML4.01 are actually the same. I mean literally the content of both specifications is the same, the vocabulary is the same, all the elements are the same, all the attributes are the same. The only difference is that XHTML1.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.

XHTML Reasons

1.html’s syntax requirements are relatively loose, which is more convenient for web page writers, but more troublesome for machines. For traditional computers, It also has the ability to be compatible with loose syntax, but for many other devices, such as mobile phones, it is more difficult, so DTDdefinition rules and xhtml with stricter syntax requirements were produced.

2. The goal of xhtml is to replace html. xhtml is a stricter and purer version of html. It is almost the same as html4.01.

http://baike.soso.com/v8351954.htm#para3

XML will be used to describe and store data, while HTML will be used to display data.

W3c already has xhtml, why does it still need to develop html5? ?

The only change to XHTML1.1 is that you must mark your document as an XML document. After marking the document as XML, Internet Explorer cannot process it. Of course, IE9 can handle it, so XHTML 1.1 is a bit out of touch with reality.

This led to differences between browser manufacturers and w3c regarding the development of HTML. The W3c main site continues to expand in the xhtml direction. In the end, browser manufacturers came up with HTML extensions themselves, which is now HTML5; but later w3c and browser manufacturers agreed to participate in HTML5 extensions together.

HTML5

Another design principle of HTML 5, it must be forward and backward compatible, compatible with future HTML versions

HTML 5 adds more diverseAPI, provides functions for embedding audio, video, pictures, client data storage, and interactive document. Other features include new page elements such as

,
,
, and
.

Some new elements and attributes that reflect typical modern usage of websites. Some of them are technically like

and tags, but have a meaning, such as
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