<hgroup>

Description

The hgroup element treats multiple header elements as a single item.

Example


<!DOCTYPE HTML> 
<html> 
<head> 
<style> 
hgroup { <!--from  ww  w . j  a v a2s.com-->
   background: grey; 
   color: white; 
   font-size: 1em; 
   margin-top: 0px; 
} 
</style> 
</head> 
<body> 
    <hgroup> 
        <h1>H1 in group</h1> 
        <h2>H2 in group</h2> 
    </hgroup> 
    <h1>H1 outside the group</h1> 
    <h2>H2 outside the group</h2> 
    <h3>H3 outside the group</h3> 
</body> 
</html>

Click to view the demo

The code above generates the following result.

hgroup




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference