<h1> inside or outside <a>?
3 answers
How w3 describes the markup A
:
An anchor is a piece of text that marks the beginning and / or end of a hypertext link.
The text between the start tag and the end tag is either the start or destination (or both) of the link. The anchor label attributes are as follows.
This means both are correct, so it depends on what you want to do the hyperlink , if you surround everything <h1>
you need to specify it as a parent:
If you only want to get a specific part <h1>
, you only surround that part like this:
+1
source to share