Grouping elements of figure h5, figcaption, hgroup introduction element

Grouping elements for the content of the page group.

figcaption elements and figure elements

  • figure element is used to define separate stream content (images, diagrams, photos, code, etc.), generally refers to a single unit. figure of content elements should be relevant to the main content, but if it is deleted, it will not affect the flow of the document .
  • figcaption element is used to add a title element groups figure, a figure up to the element allows the use of a figcaption element , the element should be placed in the first or last position of a child element of the figure element.
<p>被称作“第四代体育馆”</p>
<figure>
    <figcaption>北京鸟巢</figcaption>
    <p>拍摄者:张三,拍摄时间:2019年9月15日 17:42:12</p>
    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1568550641218&di=3d4dc50f7b0fe9a2ed3a8b25198b3730&imgtype=0&src=http%3A%2F%2Fm.tuniucdn.com%2Ffb2%2Ft1%2FG1%2FM00%2F0C%2F9D%2FCii9EFbQJa2IV2ubAAIUZv3TCucAACUQgCQyfAAAhR-415_w500_h280_c1_t0.jpg"
         alt="">
</figure>

hgroup element

hgroup element for a plurality of titles (main title and subtitle or subtitle) consisting of a title group, it is usually used in combination with the element h1 ~ h6. Typically, hgroup elements on the header element.
When using hgroup element to note the following:

  • If only one title element is not recommended hgroup elements.
  • When there is more than one element or a title and recommended hgroup element as a title element.
  • When a title contains subtitle, section or article element, and the elements recommended hgroup title associated element at the header element container.
<header>
    <hgroup>
        <h1>我的个人网站</h1>
        <h2>我的个人作品</h2>
    </hgroup>
    <p>开心快乐每一天</p>
</header>
Published 44 original articles · won praise 8 · views 2447

Guess you like

Origin blog.csdn.net/qq_39659278/article/details/100858997