HTML5學習筆記一:新增主體結構元素

來源:互聯網
上載者:User

標籤:

Dreamweaver快速鍵: 屬性面板:Ctrl+F3 建立文檔:Ctrl+N 選擇用網頁查看:F12

新增的主體結構元素:

section元素(例子如下):

<!DOCTYPE HTML>

<html>

<body>

   <section>

   <h2>section元素使用方法</h2>

    <p> section元素用於對網站或應用程式中頁面上的內容進行分塊。</p>

   </section>

</body>

 </html>

article元素(例子如下):

<!DOCTYPE HTML>

<html>

<body>

<article>  

  <header>    

<h1> apple教程</h1>   

  <p>時間:<time pubdate="pubdate">2013-2-1</time></p>   

</header>   

<p>輕鬆學習apple教程,就來</p>

<a href="http://www.apple.com">www.apple.com</a><br />   

<footer>  

   <p><small>底部著作權資訊:apple.com公司所有</small></p>   

</footer>  

</article>

</body>

</html>

article元素的嵌套(例子如下):

<!DOCTYPE HTML>

<html>

<body>

<article>   

    <header>         

    <h1>article元素的嵌套</h1>           

  <p>發表日期:<time pubdate="pubdate">2012/10/10</time></p>      

  </header>      

  <p>article元素是什嗎?怎樣使用article元素?……</p>    

   <section>         

    <h2>評論</h2>            

<article>               

    <header>                  

       <h3>發表者:唯一 </h3>                   

      <p><time pubdate datetime="2011-12-23T:21-26:00">1小時前</time></p>             

     </header>             

      <p>這篇文章很不錯啊,頂一下!</p>       

      </article>          

   <article>               

    <header>                    

     <h3>發表者:唯一</h3>                    

     <p><time pubdate datetime="2013-2-20 T:21-26:00">1小時前</time></p>              

     </header>            

       <p>這篇文章很不錯啊</p>        

     </article>     

  </section>

</article>

</body>

</html>

aside元素(例子如下):

<!DOCTYPE html>  

<html>  

<head>   

<title>標題檔案</title>   

<link rel="stylesheet" href="mystyles.css"><!--rel 屬性指示被連結的文檔是一個樣式表,rel屬性規定當前文檔與被連結文檔之間的關係-->

 </head>

 <body>   

<header>     

<h1>網站主標題</h1>

  </header>   

<nav><!--<nav> 標籤定義導航連結的部分-->  

    <ul>      

  <li>首頁</li>     

  <li>圖片</li>      

  <li>音頻</li>   

   </ul>   

</nav>   

<section>  

</section>  

  <aside>     

<blockquote>文章1</blockquote>     

<blockquote>文章2</blockquote>   

</aside>

</body>

 </html>

nav元素(例子如下):

<!DOCTYPE html>

<html>

<body>

<h1>Time元素</h1>

<p id="p1">

  <time datetime="2013-3-17"> 今天是2013年3月17日   </time>  

</p>

 <p id="p2">  

<time datetime="2013-3-17T17:00"> 現在時間是2013年3月17日晚上5點   </time>

 <p>

<p id="p3">   

<time datetime="2013-12-31">     新款冬裝將於今年年底上市    </time>

 </p>  

<p id="p4">    

<time datetime="2013-3-15" pubdate="true">     本訊息發佈於2013年3月15日     </time>

 </p>

</body>

</html>

 

HTML5學習筆記一:新增主體結構元素

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.