移動互聯網被譽為「第五次科技革命」。隨著 iPhone/Android 智能手機普及與 iPad 問世,移動端網站開發成必修課。本系列聚焦獨立移動版本方案(Media Query 方案留待後文)。

點擊放大查看完整演進脈絡
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
"https://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Hello Mobile</title></head>
<body></body>
</html>
僅差在 XML 聲明與 Basic DTD。
| 模組 | 元素/屬性 |
|---|---|
| 結構 | html, head, title, body |
| 文字 | abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1-h6, kbd, p, pre, q, samp, span, strong, var |
| 鏈接 | a |
| 列表 | dl, dt, dd, ol, ul, li |
| 表單 | button, fieldset, form, input, label, legend, select, optgroup, option, textarea |
| 表格 | caption, table, td, th, tr |
| 圖片 | img |
| 對象 | object, param |
| 表現 | b, big, hr, i, small, sub, sup, tt |
| 元信息 | meta |
| 鏈接關係 | link |
| Base | base |
| 事件 | onblur, onfocus, onload, onunload, onreset, onsubmit, onchange |
| 腳本 | script, noscript |
| 樣式 | 支援 <style> 元素、style 屬性 |
| 目標 | 支援 target 屬性 |
MP = Basic + 外部樣式表支援(代價:多一 HTTP 請求)。實際觀察:
結論:放心使用 XHTML Basic 1.1 / MP 開發移動版。
XHTML Basic/MP 降低門檻,但設備碎片化導致細節差異。W3C 價值在於統一方案。可預見:XHTML Basic/MP(低端)與 HTML5(高端)長期並行,我們需維護雙套實現——這正是移動開發的常態。
參考資源: W3C XHTML Basic 1.1 Spec | XHTML MP Introduction