的作用是什麼
元素?它們為何被引入?


元素 <section> 和 <article> 也對螢幕閱讀器很有用,同時可以幫助視障使用者閱讀網頁內容。這對電子書閱讀器也有好處。

讓我們看看如何使用這兩個元素。

<section>

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Section Tag</title>
   </head>
   <body>
      <section>
         <h1>Java</h1>
         <h3>Inheritance</h3>
         <p>Inheritance defines the relationship between superclass and subclass.</p>
      </section>
   </body>
</html>

<article>

<!DOCTYPE html>
<html>
   <body>
      <main>
         <h1>Learning</h1>
         <p>Learn to gain experience and try to share your knowledge with others.</p>
         <article>
            <h3>Web Development Tutorials</h3>
            <p>Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.</p>
         </article>

         <article>
            <h3>Academic Tutorials</h3>
            <p>Consist of Computer Fundamental, Computer Network tutorials for
            1st Semester exams.</p>
         </article>
      </main>
   </body>
</html>

更新於:2020-01-29

71 次瀏覽

開啟你的職業生涯

完成課程獲得認證

開始吧
廣告
© . All rights reserved.