Is that wrong to build news list this way:
<h1><a href="article-1.html">That happened!</a></h1>
<div class="short">Just like planned</div>
Should I prefer this?
<h1>That happened!</h1>
<div class="short">Just like planned</div>
<div><a href="article-1.html">Read it now</a></div>
or remove header elements?
<div class="news-header"><a href="article-1.html">That happened!</a></div>
<div class="short">Just like planned</div>
It's perfectly valid to put a link inside a heading. In fact, Stack overflow even does it on every question page. Do whatever makes most semantic sense for the page.
In HTML5, you can even wrap the heading inside the link, like so:
<a href="article-1.html"><h1>That happened!</h1></a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With