Is it acceptable HTML to do this...
<a href='" . $articleURL . "'>
This code is for an Article Summary, and I want both the Heading and Image to be hyperlinked.
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>
This topic is now closed. New replies are no longer allowed.