Web standards are the foundation of Web development. To ensure that Web applications can run reliably in different environments, our developed applications must comply with relevant standards. According to the nature of Web standards, Web standards can be divided into three parts: structural standards, performance standards and behavior standards.
1.1.1 Structural standards
Structure is used to sort and classify web page elements. It is composed of Web structure standard language, mainly including HTML, XML, XHTML, etc.
HTML: A subset of SGML (Standard Generalized Markup Language). The version has developed through 1.0, 2.0, 3.2, 4.0, and 4.0. By 2014, the W3C (World Wide Web Consortium) will release the final version of HTML 5.0.
XML: SGML subset. HTML cannot describe data, poor readability, long search time, etc. On February 10, 1998, the W3C published the XML 1.0 standard. XML was originally designed for EDI (Electronic Data Interchange). XML related technologies also include XSLT, XML Schema, XPath, etc. Some organizations and individuals use XML to open other XML based markup languages, such as MathML, CML, etc.
XHTML: It is based on XML to achieve a similar representation to HTML, and its syntax is more rigorous than HTML. XHTML 1.0 became a W3C recommendation on January 26, 2000. XHTML 1.1 is the last independent standard of XHTML, and 2.0 ends at the draft stage. XHTML5 is part of the HTML5 standard.
1.1.2 Performance standards
Representation is used to set the layout, color, size and other appearance styles of web page elements. Mainly including CSS ( Cascading style Sheets ), SVG, MathML, etc 。
CSS: In 1994, Harkun Li put forward the initial proposal of CSS. In the same year, the W3C organization was established. The CSS creation team became a W3C working group and worked hard to develop CSS standards. In December, the first formal standard for cascading style sheets (CSS Level 1) was released by the W3C as a recommendation. CSS Level 2 was published in May 1998. On May 23, 2001, the W3C completed the working draft of CSS3. Since CSS3, the CSS specification has been disassembled into many modules for independent upgrading, or new requirements have been set up as a new module and standardized..
SVG: defined in XML language. It is an open standard vector graphics language. Users can directly use code to describe images. They can use any word processing tool to open SVG images. By changing part of the code, the images have interactive functions, and can be inserted into HTML at any time to view through the browser. In January 2003, SVG 1.1 was established as the W3C standard.
MathML: defined in XML language. It was proposed by the W3C Mathematics Working Group. Language specification version 1.01 was published in July 1999, and version 2.0 appeared in February 2001. The W3C Mathematics Working Group released the second version of MathML 2.0 in October 2003, and then MathML 3.0 in October 2010.
1.1.3 Standards of conduct
Behavior refers to the definition of web model and the preparation of interaction. The behavior standards mainly include the document object model (W3C DOM) and ECMAScript.
W3C DOM: W3C standard, which defines the standard for accessing HTML and XML documents. W3C divides DOM into three levels:
l DOM Level1: It became a W3C proposal in October 1998, and consists of DOM model core and DOM model HTML modules. The DOM model core can map the XML based document structure, allowing to obtain and operate any part of the document. DOM model HTML extends the core of DOM model by adding HTML specific objects and functions.
l DOM Level2: The extension of the original DOM model adds support for mouse and user interface events, scope, traversal, and CSS through object interfaces. It also supports XML namespaces.
l DOM Level3: The unified method of loading and saving documents and document verification is introduced to further extend the DOM model. DOM model 3 includes a new module called "Loading and saving DOM models". After the core extension of the DOM model, it can support all the contents of XML 1.0, including XML Infoset, XPath, and XMLBase.
The dependency relationship between DOM and other standards/modules is shown in the following figure:
DOM Level
ECMAScript: It is a script programming language standardized by ECMA International (formerly European Computer Manufacturers Association) through ECMA-262. In June 1998, ECMAScript version 2.0 was released. In December 1999, ECMAScript version 3.0 was released, which became the common standard of JavaScript. On June 17, 2015, ECMAScript 6 was officially released. ECMAScript is actually a script standard in syntax and semantics. The syntax for declaring variables and operating arrays in JavaScript, JScript and ActionScript is exactly the same, because they are all ECMAScript. However, they have their own unique methods in operating browser objects, which are extensions of their own languages. In fact, JavaScript is composed of ECMAScript, DOM and BOM.