Is it valid to put h2 tag in span tag given that the span tag is displayed as block?
would it make difference for search engines (SEO) if i used div instead
Sample input:
<!DOCTYPE HTML>
<html>
<head><title></title></head>
<body>
<span style="display: block">
<h2>A</h2>
</span>
</body>
</html>
And results from W3C validator:
Element
h2
not allowed as child of elementspan
in this context.
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