Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

วิธีเพิ่ม Section ในเอกสาร HTML

ใช้แท็ก <section> เพื่อจับกลุ่มเนื้อหาที่เกี่ยวข้องกันเป็นส่วน (section) ในเอกสาร HTML5

ตัวอย่าง

<!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>