Como definir a legenda de uma imagem usando HTML?
A tag <figurecaption> em HTML é usada para definir uma legenda para o elemento de figura em um documento. Esta tag é nova em HTML5.
Sintaxe:
<figcaption> Figure caption... </figcaption>
Exemplo 1:
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
h1 {
color: green;
}
</style>
</head>
<body>
<h1>GeeksforGeeks</h1>
<h3>
How to define an image caption?
</h3>
<figure>
<img src=
"https://media.geeksforgeeks.org/wp-content/uploads/geeks-25.png"
alt="gfglogo" style="width:50%">
<figcaption>GeeksforGeeks Logo</figcaption>
</figure>
</body>
</html>
Saída:
As postagens do blog Acervo Lima te ajudaram? Nos ajude a manter o blog no ar!
Faça uma doação para manter o blog funcionando.
70% das doações são no valor de R$ 5,00...
Diógenes Lima da Silva