<article> Tag in HTML

The <article> tag in HTML is used to represent a self-contained piece of content that can stand independently. It is often used for blog posts, news articles, or any content that could be distributed or syndicated. The <article> tag helps structure the content for better accessibility and readability.

Key Points on <article> Tag:

Syntax of <article> Tag:

Syntax Example

<article>
            Content goes here
        </article>

Example of <article> Tag in HTML:

This example demonstrates the use of the <article> tag to define independent content such as a blog post.

Code Example

<article>
            <h1>How to Learn HTML</h1>
            <p>HTML is the foundation of web development. To get started, follow these steps:</p>
            <ul>
                <li>Learn the basic syntax</li>
                <li>Understand the structure of a webpage</li>
                <li>Practice building simple web pages</li>
            </ul>
        </article>

Output

How to Learn HTML

HTML is the foundation of web development. To get started, follow these steps:
  • Learn the basic syntax
  • Understand the structure of a webpage
  • Practice building simple web pages

Attributes of <article> Tag:

The <article> tag should be used for content that is intended to stand alone, such as a blog post or news article. It is a semantic element that provides better structure to the content and improves accessibility and SEO.