Wrapping Other Tags in <a>

Is it acceptable HTML to do this…


	<a href='" . $articleURL . "'>
		<h3>$articleHeading</h3>
		$articleImage
	</a>

This code is for an Article Summary, and I want both the Heading and Image to be hyperlinked.

Sincerely,

Debbie

It is in HTML 5 but not in earlier versions of HTML (where the <a> tag was defined as an inline tag and therefore couldn’t contain block tags such as h3).To comply with the current HTML standard you’d wrap the elements separately.

<h3><a href='" . $articleURL . "'> $articleHeading</a></h3> 
<a href='" . $articleURL . "'> $articleImage</a>