2015年2月4日 星期三

104-02-05_html5 elements

html5 element



section:是一段有意義的內容,使用section,需加上heading。
<section>
  <h2>...</h2>
</section>


header:可標示為一段文字、一篇文章、一頁文件的標題。
<header>
  ...
</header>

main:用來放網頁的主要內容。
<main>
  ...
</main>

footer:用來顯示版權、聯絡訊息...等資訊。
<footer>
  <p>...</p>
</footer>


aside:用來放網頁內龍的附加資訊,如:文字說明。
<aside>
  ...
</aside>

nav:用來規劃網頁的導覽區域。
<nav>
  <ul>
    ...
  </ul>
</nav>

article:有自己獨立的的內容。
<article>
  ...
</article>

figure/figcaption:宣告圖片區塊;補充圖片的資訊(標題或說明等)
<figure>
  <img src="image.jpg" alt="myPicture" />
  <figcaption></figcaption>
</figure>

time:表示人類可讀的時間與日期。有一屬性datetime,表示機器可讀的時間與日期。
<time>2014-02-05</time>
<time datetime="2014-02-05">learning</time>

架構:
<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <header>...</header>
    <nav>
      <ul>
        <li>...</li>
        <li>...</li>
      </ul>
    </nav>
    <main>
      <section>
        <h3>...</h3>
        <p>...</p>
        <aside>...</aside>
        <article>
          <figure>
            <img src="xxx.jpg" alt="myPicture" />
            <figcaption>...</figcaption>
          </figure>
          <time></time>
        </article>
      </section>
    </main>
    <footer>
      <p>...</p>
    </footer>
  </body>
</html>

沒有留言:

張貼留言