HTML article Tag Tutorial

In this section, we will learn what HTML <article> element is and how it works.

What is <article> Tag in HTML?

The HTML <article> element is considered as a container.

As the name of the element suggests, the <article> element is used when we have an article and want to put it in a webpage.

An article in this context is an entity that could be used in any place and context without losing its meaning.

We could use elements like <div> for this matter as well. But using <article> element is more structural and SEO friendly and so search engines can better understand the overall structure of your webpage.

HTML <article> Tag Syntax:

<article> Content </article>

HTML <article> Tag Values

The value of the HTML <article> element is any content that could be represented in other places as an independent entity.

Example: using <article> tag in HTML

<!DOCTYPE html>
<html>
<head>
<title>HTML is fun :)</title>
<style type="text/css">
li{
display: inline;
margin-left: 30px;
}
header{
background-color: black;
height: 40px;
}
p{
width:400px;
}
</style>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/home">Home</a></li>
<li><a href="/product">Product</a></li>
<li><a href="/support">Support</a></li>
<li><a href="/about-us">About Us</a></li>
</ul>
</nav>
</header>
<div id="content">
<article>
<h2>Apple</h2>
<p>Apple Inc. is an American multinational technology company headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, and online services. It is considered one of the Big Tech technology companies, alongside Amazon, Google, Microsoft and Facebook</p>
</article>
</div>
</body>
</html>