<article> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:article

Introduction

The article element marks a self-contained piece of content, such as a new article and a blog entry.

The article Element summary

Item Value
Element:article
Permitted Parents: Any element that can contain flow elements, but this element cannot be a descendant of the address element.
Local Attributes: None
Tag Style: Start and end tags
New in HTML5? Yes
Changes in HTML5 N/A
Style Conventionarticle { display: block; }

The following code shows the article element in use.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
      <style>
article {border: thin black solid; padding: 10px; margin-bottom: 5px}
article > footer {padding:5px; margin: 5px; text-align: center}
article > footer > nav > a {color: white}
body > article > section,
body > article > section > section {margin-left: 10px;}
body > header, body > footer {
   border: medium solid black; padding-left: 5px; margin: 10px 0 10px 0;
}
body > nav { text-align: center; padding: 2px; border : dashed thin black;}
body > nav > a {padding: 2px; color: black}

      </style> 
   </head> 
   <body> 
      <article> 
         <header> 
            <hgroup> 
               <h1 id="">CSS</h1> 
               <h2>Introduction</h2> 
            </hgroup> 
         </header>
          details. <!--from   ww  w.ja  va 2s.com-->
         <section> 
            <h1 id="morefruit">Section title</h1>
             section details. 
            <section> 
               <h1>More information</h1>
                details details 
            </section> 
         </section> 
         <footer> 
            <nav>
                More Information: 
               <a href="#">Learn More About CSS</a> 
            </nav> 
         </footer> 
      </article>  
   </body>
</html>

Related Tutorials