h5新特性
- 于繪畫的 canvas 元素
- 用于媒介回放的 video 和 audio 元素
- 對本地離線存儲的更好的支持
- 新的特殊內(nèi)容元素,比如 article闯捎、footer箱残、header、nav沿盅、section
- 新的表單控件痊土,比如 calendar肄扎、date、time赁酝、email犯祠、url、search
h5新表單
<input type="text" name="username">
<input type="number" name="" required="">
<input type="tel" name="">
<input type="search" name="" disabled="" placeholder="sdasdsaddsaddsa">
<input type="url" name="">
<input type="email" name="">
<input type="date" name="">
<input type="month" name="">
<input type="week" name="">
<input type="time" name="">
<input type="range" name="">
<input type="color" name="">
<input type="image" name="" src="sss.jpeg">
h5表單屬性
- required 必須要填寫的項目
- placeholder 用戶提示
- disabled 禁用
- form 可以通過id名把一個表單控件關聯(lián)到某個form
h5新標簽
-
details
<details open=""> <summary>標題一</summary> <summary>標題二</summary> <summary>標題三</summary>
</details>
open屬性可以展開列表
detail
-
dialog
<dialog open>This is a 對話框</dialog>
dialog
-
figure
<figure> <figcaption>圖表標題</figcaption> <div>tu1</div> <div>tu2</div> <div>tu3</div> </figure>
figure
-
map
![](sss.jpeg) <map name="planetmap" id="planetmap"> <area shape="rect" coords="100,100,200,200" href="h5新表單.html" alt="eye"> </map>
-
meter
<meter min="0" max="100" value="50"></meter>
meter
-
progress
<progress value="50" max="100"></progress>
progress
-
ruby
<ruby> 漢 <rp>(</rp><rt>Han</rt><rp>)</rp> 字 <rp>(</rp><rt>zi</rt><rp>)</rp> </ruby>
ruby
-
abbr (有seo優(yōu)化功能的標簽)
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
abbr
-
有關引入酌呆,引用的標簽
<cite>引入:cite</cite> <blockquote>引入:blockquote</blockquote> <q>引入:q</q>
-
code 顯示正常文字
<code>var sum = 0; sum=a+b;</code>
-
pre 保留換行和空格
<pre>var sum = 0; sum=a+b; </pre>
viewport
- width:可以設置html的寬度衡载,在移動端一般設置為device-width。initial-scale: 第一次進入頁面的時候隙袁,整個頁面的縮放比例痰娱。
- minimum-scale:2.0;最小縮放比例.最小縮放比例2.0頁面最小是原來的兩倍
- user-scalable=no 設置是否允許用戶縮放,no不允許縮放藤乙,yes允許縮放
- maximum-scale: 2.0;最大縮放比例.最大縮放比例2.0頁面最大是原來的兩倍