how to mix links ( tag ) and headings ( tag ) in web standard?

According to web standards you aren’t allowed to put block elements into inline elements.

As h1 is a block element and a is an inline element the correct way is:

<h1><a href="#">This is a title</a></h1>

Here is a link so you can learn more: w3 Visual formatting model

However, there is an exception that in HTML5 it is valid to wrap block-level elements (like div, p or h*) in anchor tags. Wrapping block-level elements in inline elements other than anchors still goes against the standards.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)