# Element “hgroup” is missing a required instance of one or more of the following child elements: “h1”, “h2”, “h3”, “h4”, “h5”, “h6”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/element-hgroup-is-missing-a-required-instance-of-one-or-more-of-the-following-child-elements-h1-h2-h3-h4-h5-h6
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Every `<hgroup>` must contain one heading element, from `<h1>` to `<h6>`, as a direct child, and this `<hgroup>` has none.

`<hgroup>` pairs a heading with related text, such as a subtitle, a tagline or a chapter number. It holds exactly one heading, with optional `<p>` elements before or after it. Script-supporting elements like `<script>` and `<template>` are allowed too.

This error usually appears when `<hgroup>` is used as a styling wrapper, for example around a logo link in the page header, or when every line inside it is a `<p>`. A heading wrapped in a `<div>` or `<a>` doesn't count, because it has to be a direct child. Any element that isn't allowed inside `<hgroup>` also gets its own error, such as `Element “a” not allowed as child of element “hgroup” in this context.`

If the content isn't a heading with a subtitle, replace the `<hgroup>` with a `<div>` or remove it. If it is, mark the title up as a heading and keep the extra lines in `<p>` elements. Older versions of the spec let `<hgroup>` hold several headings, but now it takes only one, so a subtitle written as `<h2>` belongs in a `<p>`.

## Invalid example

```html
<header>
  <hgroup>
    <a href="/">
      <img src="logo.png" alt="Example Shop">
    </a>
  </hgroup>
</header>

<hgroup>
  <p>Chapter 3</p>
  <p>The long way home</p>
</hgroup>
```

## Valid example

```html
<header>
  <a href="/">
    <img src="logo.png" alt="Example Shop">
  </a>
</header>

<hgroup>
  <p>Chapter 3</p>
  <h1>The long way home</h1>
</hgroup>
```
