Open In App

How to write articles in HTML document ?

Last Updated : 15 Oct, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

The <article> tag is one of the new sectioning element in HTML5. The HTML <article> tag is used to represent an article. More specifically, the content within the <article> tag is independent from the other content of the site (even though it can be related).

In other words, the article element represents a component of a page that consists of self-contained composition in a document, page or a site. For Ex. in syndication.

Syntax:

<article> Contents. . . </article>

Example:

HTML
<!DOCTYPE html>
<html>

<head>
    <style>
        article {
            width: 300px;
            border: 2px solid gray;
            padding: 10px;
            border-radius: 10px;
            margin: 0 auto;
        }

        h1 {
            color: green;
        }
    </style>
</head>

<body>
    <article>
        <img src=
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png"
            alt="" width="300" height="250" 
            class="alignnone size-medium wp-image-560930" />

        <h1>GeeksforGeeks</h1>

        
<p>
            GeeksforGeeks | A computer science
            portal for geeks. A Computer Science
            portal for geeks. It contains well
            written, well thought and well
            explained computer science and
            programming articles, quizzes and ...
        </p>

    </article>
</body>

</html>

Output:

Supported Browsers:

  • Google Chrome 6.0
  • Internet Explorer 9.0
  • Firefox 4.0
  • Opera 11.1
  • Safari 5.0

Similar Reads