figure和figcaption元素结合来为图片、视频、表格或者嵌入元素声明标题。以前使用如下方式为图片添加标题:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<figure>
<img src="file:///C|/Users/hasee/Pictures/12.jpg" title="daydayup" alt="dreamzuora logo" width="50%" height="50%" >
<p>title:This is the picture of my blog</p>
</figure>
<body>
</body>
</html>
当然可以用css样式来呈现它
css写到一半放弃了,现在还没学会。。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
figure{display:block;margin:0 auto;padding:。。。</style>
<title>无标题文档</title>
</head>
<body>
</body>
</html>