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

Detailed introduction of various versions of html doctype

Mar 28, 2017 am 11:44 AM
html

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
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles