標籤:style class code java http ext
(1)概念的變化:
HTML5專註內容與結構,而不專註的表現
<header>
<hgroup>導航相關資料</hgroup>
</header>
<nav>菜單</nav>
<article>
<h1>標題:HTML5專題視頻教程</h1>
(2)聲明與標籤:
HTML5在更多的聲明和標籤上面做了簡化,也對相容做了詳細的規定,廢除了部分元素,增加了部分元素。
HTML5標籤文法介紹及新增標記
1、文法標籤:
(1) 不允許寫的結束符的標籤:area、basebr、col、command、Embed、hr、img、input、keygen、link、meta、param、source、Track、wbr
(2)可以省略結束符的標籤:li、dt、dd、p、rt、optgroup、option、Colgroup、thread、tbody、tr、td、th
(3)可以完全省略的標籤:html、head、body、colgroup、tbody
2、新增標籤:
<article> 標記定義一篇文章
<aside> 標記定義頁面內容部分的側邊欄
<audio> 標記定義音頻內容
<canvas> 標記定義圖片
<command> 標記定義一個命令按鈕
<datalist> 標記定義一個下拉式清單
<details> 標記定義一個元素的詳細內容
<dialog> 標記定義一個對話方塊(會話框)
<embed> 標記定義外部的可互動的內容或外掛程式
<figure> 標記定義一組媒體內容以及它們的標題<footer> 標記定義一個頁面或一個地區的底部
<header> 標記定義一個頁面或一個地區的頭部
<hgroup> 標記定義檔案中一個區塊的相關資訊
<keygen> 標記定義表單裡一個產生的索引值
<mark> 標記定義有標記的文本
<meter> 標記定義 measurementwithin apredefinedrange
<nav> 標記定義導航連結
<output> 標記定義一些輸出類型
<progress> 標記定義任務的過程
<rp> 標記是用在Rubyannotations 告訴那些不支援Ruby元素的瀏覽器如何去顯示
<rt> 標記定義對rubyannotations的解釋
<ruby> 標記定義 rubyannotations.
<section> 標記定義一個地區
<source> 標記定義媒體資源
<time> 標記定義一個日期/時間
<video> 標記定義一個視頻
HTML5簡單樣本
- <!DOCTYPE html>
- <head>
- <meta charset=utf-8>
- <title>PHP100中文網HTML5專題</title>
- <style type="text/css" rel="stylesheet">
- header,nav,article,footer {border:solid 1px #666;padding:5px}
- header{width:500px}
- nav{float:left;width:60px;height:200px}
- article{float:left;width:428px;height:200px}
- footer{clear:both;width:500px}
- </style>
- <script type="text/javascript">
- document.createElement(‘article‘);
- document.createElement(‘nav‘);
- document.createElement(‘header‘);
- </script>
- </head>
- <body>
- <header>
- <hgroup>導航相關資料</hgroup>
- </header>
- <nav>菜單</nav>
- <article>
- <h1>HTML5專題視頻教程</h1>
- 發布日期:<time>09:00</time>
- <time datetime="2013-2-10">春節</time>
- <p>測試相關內容</p>
- </article>
- <footer>
- <address>地址</address>
- </footer>
- </body>
- </html>
複製代碼 詳細說明:http://html5.662p.com/thread-19-1-1.html