Mobile internet is known as the "fifth technological revolution", and with the growing popularity of smartphones such as iphones and Android and the advent of tablets such as the ipad, the potential and trends of mobile internet are becoming increasingly apparent, and the development of Web sites for mobile devices is gaining increasing attention Many companies in the country are also starting to focus on web development for all mobile devices.
Generally speaking, there are two ways to move a Web site:
1. Specialized in developing a separate mobile version
2, use media type and media query to control the performance of the Web site in mobile browsers
This article and the next article will introduce the first scenario, and the following article will end the 2nd scenario.
This article we first understand the mobile Site markup language.
The evolution of mobile website Markup Language
Let's take a look at a chart of the evolution of mobile web-related markup languages @AdrianF2E share, at a glance:
Click to enlarge
This image shows the development of markup language, including mobile website Markup Language.
Mobile Web development is more complicated than ordinary web development, and choosing a markup language for mobile sites is also quite tangled.
Initially, the WAP forum (later merged with NTT, comprising Oma,open Mobile Alliance) created an xml-based language called WML, which is the markup language for WAP sites. It's not an ideal scenario because it splits the site into two parts: the normal page uses (X) HTML, and the mobile site uses WML. Web developers want to do a mobile site also have to learn a new language rather than conversion technology, "one-stop" Creed is also broken, users can not access their favorite sites and have to find the site's WAP version-if they exist. In addition, Japan's NTT created their own language cHTML (compact HTML), but it was not compatible with XHTML and WML.
Since this is a far cry from the ideal scenario, the consortium created XHTML Basic 1.0. As its name is, this is a subset of XHTML 1.1. As XHTML 1.1 improves XHTML to small modules, a subset can contain only the basic modules, elements, and attributes that are required or can be controlled on low-end mobile devices.
Based on XHTML
XHTML Basic provides a basic module for the markup language for mobile web sites. Like its underlying XML, it is also designed to be extended. This combines the practice of WAP and NTT after the merger (i.e. OMA), which created the successor of cHTML and WML XHTML Mobile profile--It adds some of the features in the previous version to XHTML Basic. The coexistence of XHTML Basic and XHTML MP looks a bit confusing, but soon thereafter the consortium released the XHTML 1.1 version, absorbing some of the features added to the XHTML MP. So now it seems that these two versions are almost the same, as to the use of a lot of time just to see a person's preference. Here we choose XHTML Basic, because it is recommended by the consortium ....
Start using XHTML Basic
Since XHTML Basic is a subset of XHTML, if you already know the development of XHTML, then the page that starts to make XHTML Basic is extremely easy.
The following are the referenced contents: <?xml version= "1.0" encoding= "Utf-8"?> <! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML Basic 1.1//en" "Http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd" > <title>hello mobile</title> <body> </body>
|
Yes, just add an XML header declaration, and then use the XHTML basic DTD.