html – 在链接中包装块级元素的SEO效果


<a class="product-box" href="/product/123">  
    <img src="/someimage.jpg">
    <h3>My product</h3>  
    <span class="price">1000$</span>  
    <button>See detail</button>  

当这些类似盒子的元素是整个链接时,对我来说似乎更加用户友好,因为当在移动设备上时,点击一个小按钮就更难了.但是,我不相信这样做之后是否对搜索引擎优化没有负面影响.当一大块HTML被包含在< a>中时,我看起来很奇怪.标签.


最佳答案 这是
valid in HTML5,所以你可以在一个链接中包含块级元素.这是关于这个问题的
another article.

也就是说,谷歌仍然坚持这种做法.根据Webmaster Central Help Forum的这篇帖子,Google的John Mu说:

That usage [wrapping block-level elements in links] would be fine with us – we’d still pick up the link, and
would be able to associate your text as an anchor with that. We’re
pretty flexible with parsing HTML, so you could probably even use this
with HTML4. That said, the clearer you make your anchor text, the
easier it is for us to understand the context of the link, so I
wouldn’t necessarily always use a whole paragraph as the anchor for
all of your internal links.