<article> : Article Contents element

Introduction

The ‘<article>‘ element in HTML is like a container for a complete and standalone piece of content, such as a news article, blog post, or forum post. The ‘<article>‘ element wraps the entire content of the article. In this tag we make article in parts which contain :

Header : It contains the heading of the article.

Section : It contain main body of the article.

Footer : It contain the end part of article.

Here is an example :

Output :

Use of <article> tag in HTML :

Here are some key uses of the ‘<article>‘ element :

1. Organizing Content :

  • It provides a way to structure your HTML documents, making them more organized and semantically meaningful.
  • Helps differentiate a specific piece of content from other parts of the document.

2. Search Engine Optimization (SEO) :

  • Search engines use semantic HTML to understand the structure and context of content on a webpage.
  • Proper use of the ‘<article>‘ element can improve the search engine ranking of individual pieces of content.

3. Accessibility :

  • Assists screen readers and other assistive technologies in understanding the document structure.
  • Enhances accessibility for users with disabilities by providing a clear indication of standalone content.

4. Syndication :

  • The ‘<article>‘ element signals to web crawlers and syndication tools that the enclosed content is a complete and shareable unit.
  • Useful for websites that distribute content to various platforms or aggregators.

5. Clear Document Structure :

  • Helps developers and designers create a clear and logical structure for their web pages.
  • Improves code readability and maintenance by encapsulating related content within the ‘<article>‘ element.


Leave a Comment