<figcaption>定义了<figure>元素标题。<figure> 的内容可以为图像、插图、图表、代码片段等。
定义图片的标题

<!DOCTYPE html>
<html>
<head>
<title>figure元素标题案例-HTML教程www.xuandaima.com</title>
<style>
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;
}
</style>
</head>
<body>
<figure>
<img src="/Template/Foreground/img/shouye1.jpg" alt="教程">
<figcaption>炫代码教程网</figcaption>
</figure>
</body>
</html>




<figcaption>内容</figcaption>
<figcaption>标签支持HTML 全局属性
<figcaption>标签支持HTML 事件属性
如果想了解更多请移步html教程。