Computer >> Computer tutorials >  >> Programming >> HTML

How to add an article in HTML5?


Use the <article> tag to add an article in HTML5. The HTML <article> tag is used in a blog post, forum post, newspaper article etc. It specifies self-contained composition in a site, document, page, or application.

Example

You can try to run the following code to add an article −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Article Tag</title>
   </head>
   <body>
      <article>
         <h2>PHP</h2>
         <p>PHP is PHP Hypertext Preprocessor</p>
      </article>
   </body>
</html>