Article

Course- HTML5 >

We often come across standalone content on a web page. There are blog entries, forum posts, and user comments to mention a few. The article element is used for this kind of data where the content is independent of its surroundings. It is a good practice to include header, footer, and headings within the article tags. We can also use the section element between the article tags.

Let's look at an example of an article element using the following code snippet:

<!DOCTYPE html>

<html>

<body>

<article>

<h1> AITECHTONIC SITES </h1>

<section>

<h2> FASTREAD.IN </h2>

<P>Fastread originated from the idea that there exists a class of readers who respond fast and better to online content and prefer to learn new skills at their own pace from the comforts of their own rooms.

See more at.. http://fastread.in/</P>

</section>

<section>

<h2> FIXDOUBT.COM </h2>

<P> fixdoubt.com originated from the idea that there exists a class of readers who respond fast and better to online content and prefer to learn or submit new skills,things,lifstyles or any doubts at their own pace from the comforts of their own rooms. - See more at: http://fixdoubt.com/#sthash.OpuzbiTQ.dpuf

</P>

<P> User's right to do put question or answer's, articles, self thought about any subject in this site or etc... without any requirment such as login or logup.

- See more at: http://fixdoubt.com/#sthash.OpuzbiTQ.dpuf

</P>

</section>

</article>

</body>

</html>

 

The output of the code upon execution would look like this:

AITECHTONIC SITES

FASTREAD.IN

Fastread originated from the idea that there exists a class of readers who respond fast and better to online content and prefer to learn new skills at their own pace from the comforts of their own rooms. See more at.. http://fastread.in/

FIXDOUBT.COM

fixdoubt.com originated from the idea that there exists a class of readers who respond fast and better to online content and prefer to learn or submit new skills,things,lifstyles or any doubts at their own pace from the comforts of their own rooms. - See more at: http://fixdoubt.com/#sthash.OpuzbiTQ.dpuf

User's right to do put question or answer's, articles, self thought about any subject in this site or etc... without any requirment such as login or logup. - See more at: http://fixdoubt.com/#sthash.OpuzbiTQ.dpuf

 

In this code, we have included the section element within the article element.

The article element may be standalone content and the section tag is used between the article tags as it is a generic content. Hence, the article element is used for independent content like RSS feeds and news articles whereas the section element is used to denote data of a generic nature.