频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

HTML 5 预览

来源: 作者:zergine 出处:巧巧读书 2008-01-24 进入讨论组

header元素表示一个区块的头部, "头部" 可能包含不只是区块的标题, 比如头部包含了副标题, 历史版本信息或是署名都是合理的.

<header>
  <h1>A Preview of HTML 5</h1>
  <p class="byline">By Lachlan Hunt</p>
</header>
<header>
  <h1>Example Blog</h1>
  <h2>Insert tag line here.</h2>
</header>

footer元素表示用上它的那个区块的脚部, 一个具代表性的 "脚部" 包括了这个区块的一些信息, 比如谁写了它, 链接到相关的文档, 版权信息等等.

<footer>&copy; 2007 Example Inc.</footer>

nav元素表示一个导航链接的区块. 它同时适用于站点导航和目录.

<nav>
  <ul>
   <li><a href="/">Home</a></li>
   <li><a href="/products">Products</a></li>
   <li><a href="/services">Services</a></li>
   <li><a href="/about">About</a></li>
  </ul>
</nav>

aside元素为了存放和主要内容没有太大关系的内容, 是典型的标记提要内容方法.

<aside>
  <h1>Archives</h1>
  <ul>
   <li><a href="/2007/09/">September 2007</a></li>
   <li><a href="/2007/08/">August 2007</a></li>
   <li><a href="/2007/07/">July 2007</a></li>
  </ul>
</aside>

section元素表示了一份文档或是一个应用程序一般意义上的区块, 比方说章节.

<section>
  <h1>Chapter 1: The Period</h1>
  <p>It was the best of times, it was the worst of times,
  it was the age of wisdom, it was the age of foolishness,
  it was the epoch of belief, it was the epoch of incredulity,
  it was the season of Light, it was the season of Darkness,
  ...</p>
</section>
(引用自<A Tale of Two Cites>)

article元素表示一份文档, 站点的页面中独立的区块. 它适用于类似新闻, blog文章, 论坛帖子或者个人注释这样的内容.

<article id="comment-2">
  <header>
   <h4>
    <a href="#comment-2" rel="bookmark">Comment #2</a>
    by <a href="Jack'>http://example.com/">Jack O'Niell</a>
   </h4>
   <p><time datetime="2007-08-29T13:58Z">August 29th, 2007 at 13:58</time></p>
  </header>
  <p>That's another great article!</p>
</article>

正文:http://www.qqread.com/webhtml/u394480.html进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章