HTML <article> Tag

❮ Previous Reference Next ❯

Example

<article>
<h2>HTML</h2>
<p>The first version of HTML was written by Tim Berners-Lee in 1993. Since then, there have been many different versions of HTML. The most widely used version throughout the 2000`s was HTML 4.01, which became an official standard in December 1999.</p>
</article>

<article>
<h2>CSS</h2>
<p>CSS was first proposed by Håkon Wium Lie on October 10, 1994. At the time, Lie was working with Tim Berners-Lee at CERN.</p>
</article>

<article>
<h2>JavaScript</h2>
<p>Brendan Eich created JavaScript in 1995 while he was at Netscape Communications Corporation, the creators of the legendary Netscape Navigator web browser. At the time, the Java coding language was rapidly gaining traction and Netscape Communications was working to make it available in Netscape Communicator.</p>
</article>

Meaning

The <article> element is a block element defines a subset of a document’s content that forms an independent part of the document, such as a blog post, article, or other self-contained unit of information, that may be linked to or included in some other content body.

Note: This element does not have any specialty, use CSS to implemented in any browser.

Version: HTML5


Standard Syntax

<article>Article</article>

Browser Support




Status







Global Attributes

<article> element also supports the Global Attributes in HTML.


Event Attributes

<article> element also supports the Event Attributes in HTML.


More Examples

Style the <article> element using CSS:

Example

<!DOCTYPE html>
<html>
<head>
<style>
.main {
  margin: 0;
  padding: 8px;
  background-color: #ddd;
}

.main > h1, .sub-article {
  margin: 10px;
  padding: 5px;
}

.sub-article {
  background: black;
  color: white;
}

.sub-article > h2, p {
  margin: 4px;
  font-size: 90%;
}
</style>
</head>
<body>

<h1>The article element</h1>

<article class="main">
 <h1>HTML, CSS and JAVASCRIPT Founded In</h1>
 
  <article class="sub-article">
    <h2>HTML</h2>
    <p>The first version of HTML was written by Tim Berners-Lee in 1993. Since then, there have been many different versions of HTML. The most widely used version throughout the 2000`s was HTML 4.01, which became an official standard in December 1999.</p>
  </article>

  <article class="sub-article">
    <h2>CSS</h2>
    <p>CSS was first proposed by Håkon Wium Lie on October 10, 1994. At the time, Lie was working with Tim Berners-Lee at CERN.</p>
  </article>

  <article class="sub-article">
    <h2>JavaScript</h2>
    <p>Brendan Eich created JavaScript in 1995 while he was at Netscape Communications Corporation, the creators of the legendary Netscape Navigator web browser. At the time, the Java coding language was rapidly gaining traction and Netscape Communications was working to make it available in Netscape Communicator.</p>
  </article>
</article>

</body>
</html>



By Default CSS Value(s)

Most of the browsers will display the <article> element with the following by default value(s)

article {
	display: block;
}
❮ Previous Reference Next ❯