首頁 > web前端 > H5教程 > HTML5的結構與語意(2):結構_html5教學技巧

HTML5的結構與語意(2):結構_html5教學技巧

WBOY
發布: 2016-05-16 15:51:47
原創
1227 人瀏覽過

  由於缺乏結構,即使是形式良好的 HTML 頁面也比較難以處理。必須分析標題的級別,才能看出各部分的劃分方式。側邊欄、頁尾、頁首、導覽條、主內容區和各篇文章都由通用的 div 元素來表示。 HTML 5 增加了一些新元素,專門用來識別這些常見的結構:
 · section:這可以是書中的一章或一節,實際上可以是在HTML 4 中有自己的標題的任何東西
 · header:頁面上顯示的頁眉;與head 元素不一樣
 · footer:頁腳;可以顯示電子郵件中的簽名
 · nav:指向其他頁面的一組連結
 · article:blog、雜誌、文章彙編等中的一篇文章
  我們來考慮一個典型的 blog 主頁,它的頂部有頁眉,底部有頁腳,還有幾篇文章、一個導航區和一個邊欄,見代碼1 典型的 blog 頁面


Mokka mit Schlag




>
Mokka mit Schlag




"/blog/birding/2007/04/23/spring-comes-and-goes-in-sussex-county/">
Spring Comes (and Goes) in Sussex County



Yesterday I joined the Brooklyn Bird Club for our
annual trip to Western New Jersey, specifically Hyper
Humus, a relatively recently discovered hot spot. as a nice winter morning when we arrived
at the site at 7:30 A.M., progressed to Spring around
10:00 A.M., and reached early s by 10:15.



"/blog/birding/2007/04/23/but-does-it-count-for-your-life -list/"> But does it count for your life list?




Seems you can now go href="http:> href="http: //www.wired.com/science/discoveries/news/
2007/04/cone_sf">bird watching via the Internet
. I
haven't been able to test it out yet (20 user
limit apparently) but this is certainly cool.
Personally, I can't imagine it replacing
actually being out in the field by any small amount. On the ways found it quite
sad to meet senior birders who are no longer able to
hold binoculars steady or get to the park. I can
imagine this might be of some interest to them。 elderly birder did a big year on TV, after
he could no longer get out so much. This certainly
tops that.


« _fcksavedurl=""/blog/page/2/">«" Previous Entries

March 2007
January 2007 Copyright 2007 Elliotte Rusty Harold


  即使有正確的縮進,這些巢狀的 div 仍然讓人覺得非常混亂。在 HTML 5 中,這些元素可以替換為語意性的元素,請參閱程式碼2 用 HTML5編寫的典型blog頁面


Mokka mit Schlag






>Mokka mit Schlag




"/blog/birding/2007/0044 /23/spring-comes-and-goes-in-sussex-county/">
Spring Comes (and Goes) in Sussex County


Yesterday I joined the Brooklyn Bird Club for our
annual trip to Western New Jersey, specifically Hyper
Humus, a relatively recently discovered hot spot. It
started out as a nice winter morning when we arrive at A.M., and reached early summer by 10:15.



"/blog/birding/2007/04/23/but-does-it-count-for-your-life-list/">
But does it count for your life list?


Seems you can now go href="http://www.wired.com/science/discoveries/news/
2007/04/cone_sf">bird watching via the Internet
. I
haven't been able to test it out yet (20 user
limit apparently) but this is certainly cool.
人in the field by any small amount.
On the other hand, I've always found it quite
sad to meet senior birders who are no longer able to

hold binoculars steaders who are no longer able to
hold binoculars steady parkor get to the y parkor I. can
imagine this might be of some interest to them. At
least one elderly birder did a big year on TV, after
« _fcksavedurl=""/blog/page/2/">«" Previous Entries
March 2007



>
January 2007


>Copyright 2007 Elliotte Rusty Harold   現在不再需要 div 了。不再需要自己設定 class 屬性,從標準的元素名稱就可以推論出各個部分的意義。這對於音訊瀏覽器、手機瀏覽器和其他非標準瀏覽器尤其重要。     (待續)
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板