Xml html xhtml html5, xhtmlhtml5

Source: Internet
Author: User

Xml html xhtml html5, xhtmlhtml5

1. XML

What is XML?
  • XML refers to the EXtensible Markup Language (EXtensible Markup Language)
  • XML is a markup language, similar to HTML
  • XML is designed to transmit data rather than display data.
  • The XML tag is not predefined. You need to customize the tag.
  • XML is designed to be self-descriptive.
  • XML is W3C recommendation Standard
Main differences between XML and HTML

XML is not an alternative to HTML.

XML and HTML are designed for different purposes:

XML is designed to transmit and store data, 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.

XML with no behavior

XML is not used.

This may be hard to understand, but XML won't do anything. XML is designed to structure, store, and transmit information.

The notes John wrote to George are stored as XML:

<note><to>George</to><from>John</from>

The above note is self-descriptive. It has the title and message, and contains the information of the sender and receiver.

However, this XML document has not done anything. It is just pure information encapsulated in XML tags. We need to write software or programs to send, receive, and display this document.

XML is only plain text

XML is nothing special. It is just plain text. Any software capable of processing plain text can process XML.

However, applications that can read XML can process XML tags in a targeted manner. The functional meaning of a tag depends on the characteristics of the application.

You can use XML to create your own tags.

The labels in the preceding example are not defined in any XML standards (such as <to> and <from> ). These tags were invented by the creator of the document.

This is because XML does not have predefined labels.

The tags used in HTML (and the HTML structure) are predefined. HTML documents only use tags defined in HTML standards (such as <p> and

XML allows creators to define their own labels and their own document structures.

XML is not an alternative to HTML.

XML is a supplement to HTML.

XML does not replace HTML. It is important to understand this. In most web applications, XML is used to transmit data, while HTML is used to format and display data.

The best description of XML is:

XML is an information transmission tool independent of software and hardware.

XML is W3C recommendation Standard

The Extensible Markup Language (XML) became the W3C recommendation standard in February 10, 1998.

For more information about W3C XML activities, visit our W3C tutorial.

XML is ubiquitous

When we see the rapid development progress of the XML standard and the rapid adoption of this standard by a large number of software developers, we can't help but sigh that this is really amazing.

Currently, XML does not play a role in the Web as HTML, which is the cornerstone of the Web.

XML is ubiquitous. XML is the most common tool for data transmission between various applications, and is becoming increasingly popular in the field of information storage and description.

 

2. HTML

 

What is HTML?

 

HTML is a language used to describe web pages.

 

  • HTML refers to the hypertext markup language (HYperTExtMArkupLAnguage)
  • HTML is not a programming language, but a markup language)
  • A markup language is a set of markup tags)
  • HTML uses tag to describe Web pages

 

HTML Tag

HTML tag is usually called HTML tag ).

  • HTML tags are keywords surrounded by Angle brackets, such as
  • HTML tags are usually paired, such as <B> and </B>.
  • The first tag in the tag pair is the start tag, and the second tag is the end tag.
  • The start and end labels are also known as open and closed labels.

 

HTML document = webpage
  • HTML document description webpage
  • HTML documents include HTML tags and plain text
  • HTML documents are also called Web pages

Web browsers read HTML documents and display them as webpages. The browser does not display HTML tags, but uses tags to explain the content of the page:

Example

  
  • Text description webpage between
  • The text between <body> and </body> is visible on the page.
  • The text between
  • The text between <p> and </p> is displayed as a paragraph

3. XHTML

 

 

What is XHTML?

 

  • XHTML refers to the Extensible hypertext markup language.
  • XHTML and HTML 4.01 are almost the same
  • XHTML is a more rigorous and pure HTML Version.
  • XHTML is HTML defined as an XML application.
  • XHTML is the W3C recommendation standard released in January 2001.
  • XHTML is supported by all mainstream browsers

 

Why use XHTML?

Many pages on the Internet contain "bad" HTML.

If you view it in a browser, the following HTML code runs normally (even if it does not comply with the HTML rules ):

XML is a markup language that must be correctly labeled and well-formatted.

If you want to learn XML, please read our XML tutorial.

Today's technology industry has some different browser technologies. Some of them run on computers, while others may run on mobile phones or other small devices. Small devices often lack the "bad" markup language resources and capabilities.

So-developed XHTML by combining the strengths of XML and HTML. XHTML is the HTML that is redesigned as XML.

The most important difference from HTML:

Document Structure
  • Xhtml doctype is mandatory
  • The XML namespace attribute in
  • <Html>,
Element syntax
  • XHTML elements must be correctly nested
  • XHTML elements must always be disabled
  • The XHTML element must be in lowercase.
  • The XHTML document must have a root element.
Attribute syntax
  • The XHTML attribute must be in lower case.
  • XHTML attribute values must be enclosed by quotation marks
  • It is also forbidden to minimize XHTML attributes.

 

<! DOCTYPE...> is mandatory

The XHTML document must be declared as An XHTML document type (xhtml doctype declaration ).

You can find the complete XHTML document type in the W3School label reference manual.

The

The following example shows the XHTML document with the minimum required tags:

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

 

How to convert from HTML to XHTML

 

Test XHTML with W3C validators

Enter your URL in the text box below:

<!DOCTYPE HTML>

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.