Relationship between HTML, CSS, JavaScript, jquery, stylesheet, and XML

Source: Internet
Author: User
Tags xslt xquery

1. CSS is the partner of HTML.

In the coding process, HTML plays a different role: HTML is responsible for the specific content (structure) of the webpage, while CSS modifies the form (layout) of the webpage ).

CSS has a superior feature, that is, it can centrally manage the page layout. That is to say, you do not need to use the style attribute in each label. Instead, you can declare it only once, and the browser will display the text according to the corresponding page layout effect:

By separating CSS documents, you can centrally manage the layout of multiple pages at the same time to facilitate unified style. This is also the best way to access your website.

 

2. Javascript is used to perform operations on HTML.

3. jquery is used to standardize JavaScript, and the structure and behavior are separated.

From this point of view, similar to jquery in the original JavaScript, the original JavaScript needs to add events on the page element, such as <a onlick = ""> TT </a>, in this way, the page is messy. jquery brings these events together to maintain a clean HTML structure.

 

4. stylesheet

 

5. xml

XML is used to describe data, while HTML is used to display data.
Without any information about how to display data, most browsers only display the XML documentSource code.

 

6. XHTML tutorial
HTML requirements are loose and XML requirements are strict. Therefore, XHTML is a standard between the two. It is used to restrict the use of browsers on devices, such as mobile phones, and HTML such as Browser IE on PC, XHTML compatibility.

All XHTML elements must be correctly nested, XHTML must have a good structure, all labels must be in lower case, and all XHTML elements must be closed with quotation marks, to have a root node, the xmlns attribute in the <HTML> label is required (<HTML xmlns = "http://www.w3.org/1999/xhtml">), in short, are similar to the XML rules.

Now a new HTML page is created in vs.net, which will automatically add xmlns. In addition, all XHTML documents must have the doctype declaration, and all XHTML documents must be declared as file types (doctype Declaration ).

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The specific types include strict, transitional, and the other one. in vs.net, the default value is transitional and w3csholl is strict. However, it is too strict. Generally, transitional can be used.

 

What XHTML 1.0 does is to transform HTML 4.0 (the final html Version) according to the XML standard requirements. XHTML 1.0 does not define any new elements and attributes, but inherits all elements and attributes of HTML 4.0. Therefore, XHTML 1.0 is compatible with HTML 4.0. XHTML 2.0 has greatly improved XHTML 1.0, and is not compatible with XHTML 1.0 in many places. Currently, mainstream browsers only support XHTML 1.0. The discussion here is restricted to the range of XHTML 1.0.

 

7. XSL

XSL-not only the style table language, but also three parts of XSL:
1. XSLT: a language used to convert XML documents.
2. XPath: a language used for navigation in XML documents.
3. XSL-FO: a language used to format XML documents.

 

In general, CSS, XSL, JavaScript, and XML data islands are used to display XML documents. formatting XML with CSS is not a common method and cannot represent the future of XML document style. XSLT is recommended for W3C.

XSLT is the preferred XML style table language.
XSLT (Extensible Stylesheet Language Transformations) is far better than CSS.
One way to use XSLT is to convert the XML file to HTML before the browser displays it, as shown in the following examples:

<? XML version = "1.0" encoding = "ISO-8859-1"?>
<? XML-stylesheet type = "text/XSL" href = "Simple. XSL"?>
<Breakfast_menu>
<Food>
<Name> Belgian waffles </Name>
<Price> $5.95 </price>
<Description>
Two of our famous Belgian waffles
</Description>
<Calories> 650 </calories>
</Food>
</Breakfast_menu>

 

8. XQuery

XQuery is also called XML query. XQuery is designed to query XML data. The best way to explain XQuery is: relative to XML, XQuery is equivalent to SQL relative to database.

XQuery is a very complexProgramming LanguageIs a superset of xpath. XQuery can complete any task that XPath can accomplish. It can be considered as a common language, so it is easy to overcome many limitations of XPath, but the cost is a slight increase in complexity.

XPath is concise, while XQuery is more powerful and flexible. XPath is very suitable for many queries. For example, you can use XPath to create an unordered list of phone numbers from some records in the XML document. However, if you want to express the expressions of more complex record selection conditions, convert the result set, or perform recursive queries, you need to use XQuery.

 

In short, XPath is the core of XSLT, while XSLT is an XML Conversion language, while XQuery is based on XPath. A separate XPath path is an effective XQuery. For example, "Cargo/air cargo" means all the current air cargo. The appearance and capabilities of XQuery are similar to those of SQL:

 

9. xlink and xpointer

In a word, it is actually adding the hyperlink and anchor function in XML.

Conclusion: ASP to Asp.net is also the idea of clarifying the mess of a pot of porridge.

 

CSS (Cascading Style Sheet, Cascading Style Sheet) modifies html

XSL (XML style table language, Extensible Stylesheet Language) modifies XML

That is:
CSS = html style sheet
XSL = XML style sheet

 

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.