<hgroup> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:hgroup

Introduction

The hgroup element marks multiple header elements as a single item without affecting the outline of your HTML document.

The hgroup Element summary

Item Value
Element: hgroup
Local Attributes: None
Contents: One or more header elements (h1-h6)
Tag Style:Start and end tags
New in HTML5?Yes
Changes in HTML5 N/A

Style Convention

hgroup {
   display: block;
}

The most common problem that the hgroup solves is subtitles.

The following code shows how to create a section with title and subtitle.

Using the h1 and h2 Elements to Create a Title with a Subtitle

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <h1>HTML</h1> 
      <h2>Introduction</h2>
       HTML content. 
      <h2>Element</h2>
       HTML element details 
      <h3>More information</h3>
       More information goes here.  <!--  ww w .ja v a  2 s.  c  o  m-->
   </body>
</html>

Related Tutorials