The article tag or <article> tag in HTML is used to define a content that is independent of other contents in a webpage.
So far we have used <div> tags to represent self contained articles in HTML. However, with Semantic tags, we got the article tag that defines a a self dependent content for a webpage. The Article Tag usually contains a heading and a paragraph and is independent of the other contents.
The article tag usually contains a news article, blog posts, online forum posts e.t.c.
Let us understand article tag with the below example.
<html> <body> <article> <h1>First Paragraph</h1> <p>This is the first paragraph</p> </article> </body> </html>
So, if you look at the above code. The article tag represents an article in the HTML page. For simplicity we have written arbitrary texts inside the article tag.
<article> <h1>First Paragraph</h1> <p>This is the first paragraph</p> </article>
Now, the article tag is not just restricted to one article tag in a webpage. In simple words we can have multiple article tags in an HTML file.
<html> <body> <article> <h1>First Paragraph</h1> <p>This is the first paragraph</p> </article> <article> <h1>Second Paragraph</h1> <p>This is the second paragraph</p> </article> </body> </html>