XML, XHTML, and HTML knowledge, xmlxhtml

Source: Internet
Author: User

XML, XHTML, and HTML knowledge, xmlxhtml

1. What are XML, XHTML, and HTML?

According to W3C definition, xml refers to the Extension Markup Language. It is designed to transmit data rather than display data. labels in XML are not predefined, you can customize the tag, which is the W3C recommendation standard.

XHTML: Extensible HyperText Markup Language, which is a type of HTML that is redefined by XML applications. It is designed to replace HTML, it is almost the same as HTML4.01. It is a more rigorous and pure version of HTML and a W3C standard.

HTML: Hyper Text Markup Language)

2. Why does HTML still have XHTML?

First, W3C believes that many web pages on the world wide contain bad HTML code and can still work well even if they do not follow the HTML rules.

<Html> 

Secondly, it is too simple because it cannot meet the needs of more network devices and applications. For example, mobile phones, PDAs, and Information appliances cannot directly display HTML. Almost all devices support XML, but the purpose of the design is not to display data. Therefore, the combination of the strengths of the two, the birth of XHTML, enables us to write a good structure of documents, these documents can work better on all browsers and are backward compatible.

3. Main differences between XML and HTMl

XML is not an alternative to HTML. XML and HTML are designed for different purposes: XML is designed for data transmission and storage, with the focus on data content. HTML is designed to display data. Its focus is on the appearance of the data. HTML is designed to display information, while XML is designed to transmit information. ----------- From w3c

4. Main differences between XHTML and HTML

XHTML elements must be correctly nested. The XHTML element must be disabled. (Empty tag and non-empty tag) the tag name must be in lowercase letters. The XHTML document must have the root element.
The XHTMl attribute value must be enclosed in double quotation marks. ------- From w3c manual ----------

5. XHTML1.0 document types

Strict type:

1 <!DOCTYPE html2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

In this case, a clean mark is required to avoid confusion. Use it with the stacked style sheet.

Transition type:

1 <!DOCTYPE html2 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

In this case: When you need to use HTML's performance features, and you need to write XHTML for browsers that do not support stacked style sheets.

Framework set:

1 <!DOCTYPE html2 PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

In this case, you need to use the HTML framework to split the browser window into two or more frames.

 

6. XHTML status quo and HTML5

XHTML is dead, but some of its syntax is still popular with many Web developers. The new version of HTML5 is a new standard for HTML, XHTML, and html dom. October 28 this yearW3CThe announcement has been completed, and more browsers are beginning to support HTML5-related features. Will browser compatibility be improved.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.