How to write articles in HTML document ?

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

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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=
            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>

chevron_right


Output:



Supported Browsers:

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

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.