Introduction to the grouping elements figure, figcaption and hgroup in H5


The group element is used to group content in a page.

Figure element and figcaption element

  • figureElement is used to define independent stream content (image, chart, photo, code, etc.), generally referring to an independent unit.figureThe content of the element should be related to the main content, but if it is deleted, it alsoNo impact on document flow
  • figcaptionElement is used to add a title to the figure element group,At most one figcaption element is allowed in a figure element, which should be placed in the first or last child element of the figure element.
It's called "the fourth generation Gymnasium"

    Beijing bird's nest
    Photographer: Zhang San, shooting time: 17:42:12, September 15, 2019

Hgroup element

The hgroup element is used to combine multiple titles (main title and sub title or sub title) into a title group, which is usually used in combination with h1-h6 elements. Typically, place the hgroup element in the header element.
Note the following when using the hgroup element:

  • The hgroup element is not recommended if there is only one header element.
  • When one or more titles and elements appear, the hgroup element is recommended as the title element.
  • When a title contains a subtitle, section, or article element, it is recommended to store the hgroup element and Title Related Elements in the header element container.
My personal website
        My personal work
    Happy every day