<p>Is either:</p>

<pre><code>&lt;a href="#"&gt;&lt;h1&gt;text here&lt;/h1&gt;&lt;/a&gt;
</code></pre>

<p>or</p>

<pre><code>&lt;h1&gt;&lt;a href="#"&gt;text here&lt;/a&gt;&lt;/h1&gt;
</code></pre>

<p>"correct". Is there any benefit of using the first one, it seems more logical to me. Perhaps from an SEO point?</p>

```
```
<h1><a href="#">text here</a></h1>
```
```
is correct, as HTML does not allow a block element (
```
<h1>
```
) within an inline element (
```
<a>
```
) (
src
). your first example will fail
validation
.
Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.