Are new HTML5 elements like
and
useless?


The elements <section> and <article> are useful for screenreaders as well and help visually impaired users in reading the content of your web page. These are beneficial for eBook readers as well.

Let us see how to work with both the elements.

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

Updated on: 27-Jan-2020

62 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements