The article element is used for this kind of data where the content is independent of its surroundings.
We can also use the section element between the article tags.
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.
<html>
<body>
<article>
<h1> Fruit Facts </h1>
<section>
<h2> Citrus fruits </h2>
Citrus fruits are good for your health.
<br>
Oranges and sweet limes are examples of citrus fruits.
<br>
They contain Vitamin C, which is good for colds and coughs.
</section>
<section>
<h2> Dried fruit </h2>
Dried fruit is very nutritious.
<br>
It is advisable to eat almonds to maintain good health.
<br>
Dried fruit helps boost the immune system.
</section>
</article>
</body>
</html>
Output
We can also use the section element between the article tags.
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.
<html>
<body>
<article>
<h1> Fruit Facts </h1>
<section>
<h2> Citrus fruits </h2>
Citrus fruits are good for your health.
<br>
Oranges and sweet limes are examples of citrus fruits.
<br>
They contain Vitamin C, which is good for colds and coughs.
</section>
<section>
<h2> Dried fruit </h2>
Dried fruit is very nutritious.
<br>
It is advisable to eat almonds to maintain good health.
<br>
Dried fruit helps boost the immune system.
</section>
</article>
</body>
</html>
Output
No comments:
Post a Comment