h2 tag inside anchor tag

I’m confused. I set an

< h2 >

tag with an #id, and give it a background image. I want both the image and the text to be a clickable link. Thus, I want to wrap the

< h2 >

tag inside the anchor tag. Validator tells me it’s not valid HTML. I set the anchor to a class of .block, which is defined as

.block {display:block}

. Still doesn’t validate. Do you see the logic? Or, am I just making a mistake?