我可以将带有锚的徽标嵌套在<figure>
内吗?这样对吗?这是代码
<header>
<div class="row">
<figure class="col-sm-5"> <a href="index.html" class="logo"> <img src="images/logo.gif" class="img-responsive" height="60" width="330" alt="site-logo"> </a> </figure>
<div class="col-sm-7">
<div class="well">
<div class="row">
<div class="col-xs-9"><nav></nav></div>
<figure class="col-xs-3"> <img src="images/helpline.gif" class="img-responsive" height="60" width="120" alt="helpline-image"> </figure>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</header>
<h2>
<a href="#">
<img src="logo.gif" alt="stackoverflow-logo"/>
</a>
</h2>
为备用文本标签alt
提供适当的名称,而不是站点徽标,而是提供您的公司名称徽标
HTML<figure>
元素代表独立的内容,通常带有标题(<figcaption>
),通常被称为单个单元。虽然它与主流相关,但其位置与主流无关。通常,这是正文中引用的图像,插图,图表,代码段或架构,但是可以将其移至另一页或附录而不影响主流程。
参考:MDN
<h2>
中;它不是它的地方,它可能会影响您的可访问性,dom标题结构和SEO性能。因为您可能会做一些事情,但并不能使其成为正确的解决方案。下面是有关如何使用标题标签的一些链接。如果您希望它看起来像<h2>
,则在CSS中对其进行样式设置。