<figcaption>: O elemento de legenda da figura
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since julho de 2015.
O Elemento HTML Figcaption (<figcaption>) representa uma legenda ou uma legenda associada com uma figura ou ilustração descrita pelo resto dos dados do elemento <figure> que seu elemento pai.
Experimente
<figure> <img src="/shared-assets/images/examples/elephant.jpg" alt="Elephant at sunset" /> <figcaption>An elephant at sunset</figcaption> </figure> figure { border: thin #c0c0c0 solid; display: flex; flex-flow: column; padding: 5px; max-width: 220px; margin: auto; } img { max-width: 220px; max-height: 150px; } figcaption { background-color: #222; color: #fff; font: italic smaller sans-serif; padding: 3px; text-align: center; } | Categorias de conteúdo | Nenhuma. |
|---|---|
| Conteúdo permitido | Flow content. |
| Omissão de Tag | Nenhuma, tanto a tag de início quanto a de fim são obrigatórias. |
| Elemento Pai Permitido | Um Elemento <figure> |
| Interface DOM | HTMLElement |
Atributos
Esse elemento possui somente os atributos globais.
Exemplos
Por favor, consulte a página <figure> para visualizar o exemplos do elemento <figcaption>.
Especificações
| Specification |
|---|
| HTML> # the-figcaption-element> |
Compatibilidade com navegadores
Veja também
- O elemento
<figure>.