for the above 3 kinds of technology, we often use, here to do a concrete summary, to compare these 3 things.
XML, extentsible Markup Language (Extensible Markup Language), is a meta-language used to define other languages, formerly SGML (Standard Universal Markup Language). It has no tag set (tag set) and no grammatical rules (grammatical rule), but it has syntactic rules (syntax rule). Any XML document must be well-constructed for any type of application and correct parsing (well-formed), that is, each open tag must have a matching end tag, not a reversed-order label, and should conform to the requirements of the specification in the statement composition. An XML document can be valid (valid), but it is not necessarily a valid requirement. A valid document is a document that conforms to its document type definition (DTD). If a document conforms to a schema, then the document is schema-valid (schema valid).
The full spelling of the HTML is hypertext Markup Language, Chinese is the Hypertext Link Markup Language. HTML (Hypertextmark-uplanguage) is the Hypertext Markup Language, which is the description language of www. The purpose of the HTML language is to make it easy to connect text or graphics stored on one computer with text or graphics from another computer to form an organic whole, regardless of whether the specific information is on the current computer or on other computers in the network. We just use the mouse to pick an icon in a document, and the Internet immediately goes to the content associated with that icon, which may be stored on another computer in the network. HTML text is a descriptive text made up of HTML commands that describe text, graphics, animations, sounds, tables, links, and so on. The structure of the HTML consists of the head (head) and the body (body), where the head describes the information required by the browser, while the body contains the specific content to be described. In addition, HTML is the universal language of the network, a simple, universal, all-in-one markup language. It allows web-makers to create complex pages of text and images that can be browsed by anyone else on the web, regardless of the type of computer or browser used.
XHTML refers to the extended Hypertext label Language (extensible Hypertext Markup Language). As the next generation of HTML, we can understand that XHTML is an upgraded version of HTML. XHTML is HTML like XML, a transitional language, it is higher than the rigor of HTML, and then the basic language is still the use of HTML tags, but the abolition of some of the performance layer of the label, colleagues in the standard requirements such as the strict nesting of tags, tags and so on. There are different browser technologies in today's market, some browsers run on computers, and some browsers run on mobile phones and handheld devices. The latter has no ability or means to explain bad markup language. So by combining the strengths of HTML and XML, we've got the markup language-XHTML that can come in handy today and in the future. XHTML can be read by all XML-enabled devices, and XHTML allows us to write well-structured documents that work well with all browsers and are backwards compatible before the rest of the browsers are upgraded to XML support.
Two words: 1,xml is designed to describe the data, the focus is: what is the data, how to store the data. 2,html is designed to display data, with a focus on displaying data and how to display it better.
- The relationship between HTML and XML:
1, in fact, HTML and XML do not have a very inevitable connection, XML is not to replace HTML, in fact, XML can be seen as a complement to HTML.
2. The goal of XML and HTML is different: HTML is designed to display data and focus on the appearance of the data, while XML is designed to describe the data and focus on the content of the data.
3, similar to HTML, XML does not take any action. Although an XML tag can be used to describe the structure of an item such as an order, it does not contain any code that can be used to send or process the order and ensure delivery by that order, and others must write code to actually perform these operations on the data in XML format. Unlike HTML, XML tags are defined by the author of the schema or document and are unrestricted. HTML tags are pre-defined; HTML authors can only use tags that are supported by the current HTML standard.
4. Unlike HTML, XML tags are defined by the author of the schema or document and are unrestricted. HTML tags are pre-defined; HTML authors can only use tags that are supported by the current HTML standard.
XHTML as an upgraded version of HTML, of course there will be more specifications. Specific as follows:
1, all tokens must have a corresponding closing tag. Previously in HTML, you could open many tags, such as <li> without necessarily writing the corresponding and </li> to close them. But it's not legal in XHTML. XHTML requires a rigorous structure, and all tags must be closed. If the label is not paired individually, close it by adding a "/" to the label at the end. For example: 2, all label elements and attribute names must be lowercase. Unlike HTML, XHTML is sensitive to capitalization,<title> and <TITLE> are different labels. XHTML requires that all labels and attribute names must be lowercase. For example:<body> must be written in <body>. Uppercase and lowercase inclusions are also not recognized, and typically Dreamweaver automatically generates attribute names "OnMouseOver" that must also be modified to "OnMouseOver".
3, all XML tags must be nested appropriately. Also, because XHTML requires a rigorous structure, all of the nesting must be in order, and the code that we wrote previously:<p><b></p></b> must be modified to: <p><b></ B></p>. That is, a layer of nesting must be strictly symmetric.
4, all attributes must be enclosed in quotation marks "". In HTML, you don't need to quote attribute values, but in XHTML they must be quoted. For example:5, all < and & special symbols are encoded. Any less than sign (<), not part of the label, must be encoded as & L T; any greater than sign (>), not part of the label, must be encoded as & G T; any and number (&), not part of the entity, must be encoded as & a M P Note: There are no spaces between the above characters.
6, assign a value to all attributes. XHTML specifies that all properties must have a value, repeating itself without a value. For example: <input type= "checkbox" name= "Shirt" value= "medium" checked> must be modified to: <input type= "checkbox" Name= "Shirt" Value= "Medium" checked= "checked"/>
7, do not make "--" in the comment content. "--" can only occur at the beginning and end of XHTML annotations, i.e. they are no longer valid in content. For example, the following code is invalid:<!--here is the comment-----------here is the comment-->: replace the inner dashed line with an equal sign or a space.
<!--here is the note ============ here is the comment-->: Some of these specifications look strange, but all of this is to make our code a uniform, unique standard for future data reuse.
8, the picture must have the explanatory text. Each picture label must have alt explanatory text. //In order to be compatible with Firefox and IE browser, for picture label, try to use ALT and title double label, Simple alt tag in Firefox without a picture Description!
- How to convert HTML to XHTML
- Add an XHTML <! doctype> to the Web page.
- Add the xmlns attribute to each page in the HTML element.
- Modify all the elements to lowercase.
- Closes all empty elements.
- Modify all the property names to lowercase.
- All attribute values are added in quotation marks.
Xml,html,xhtml