Remember, the heading tags h1, h2, h3, h4, h5 and h6 are all block elements and they can contain inline elements. Since the link tag is an inline element, you cannot add any block elements within. So, heading tag should always come first before the link tag. Please look at the HTML demo below!
Replace LINK_HERE and LINK_TITLE_HERE to URL and your link title, respectively.