我的文档类型是html5。我正在验证这个 HTML:
<a class="article-link-block" href="http://localhost/article/231">
<img src="http://localhost/images/article-image.jpg">
<div class="article-info">
<a class="title" href="http://localhost/article/231">Title of the article</a>
<a class="category" href="http://localhost/category/5">Category</a>
<div class="views">24x</div>
<div class="date">13.3.2013</div>
</div>
</a>
我收到此错误:
Error: An a start tag seen but an element of the same type was already open.
我希望整体div
成为一个锚标签(article-link-block),并在其中另一个锚标签到类别、用户等和其他 div(上面的代码被简化为只有文章和类别链接。)
如何在 html 验证期间摆脱此错误?