【发布时间】:2014-05-25 02:16:11
【问题描述】:
我读到了这个问题:Do I still need to use the title attribute if my element has a `<figcaption>`?
但答案是面向img标签,但是,如果我有以下figure,没有img,但有table:
<figure title="The table of life">
<table>
<caption>The table of life</caption>
<tbody>...</tbody>
</table>
<figcaption>The table of life<figcaption>
</figure>
这里我有 3 种方式来提供标题:<caption> 标签(仅适用于 table)、<figcaption> 标签(仅适用于 figure)和 title 属性(通用)。
哪个更好用?
这是一个没有table 的figure 示例:
<figure title="Description of my char in RPG">
<h1>Seninha</h1>
<p>Seninha was born in the moon in the year of 13...<p>
<dl>
<dt>HP</dt><dd>15</dd>
<dt>MP</dt><dd>18</dd>
<dt>IQ</dt><dd>99999</dd>
<dt>ST</dt><dd>-10</dd>
</dl>
<figcaption>Description of my char in RPG<figcaption>
</figure>
【问题讨论】:
标签: html semantic-markup figure