How do we include a section in an HTML document?



To add a section, use the <section> tag in HTML. You can try to run the following code to include a section in an HTML document −

Example

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

Advertisements