H4 Tag on <a href> Link
Solution 1
It's invalid to put a block element (H4) inside an inline element (a). Try putting them the other way around (the link inside the H4).
Solution 2
What Karpie said.
Or use (and validate in) HTML5, in which using <a>
tags as block elements is perfectly valid :)
Rakesh Prajapati
My Self Rakesh Prajapati working as Sr.Web Designer and group lead in CommercePundit Technologies Private limited company since 2009. Over 3 years of experience in web technogoly and 4+ experience in graphic designing. Hands on experience in Magneto, OsCommerce, Joomla, Drupal, Wordpress, HTML, CSS, Photoshop, Dreamweaver, Illustrator.
Updated on June 04, 2022Comments
-
Rakesh Prajapati almost 2 years
My website is passed in W3C validation and now I need to put H4 Tag on somewhere hyperlink at homepage. When I put H4 tag some error is showing in W3C exam. so How can I put H4 Tag on Link.
Here is W3C error code :
<li><a rel="http://www.xyz.com/portfolio.html" title="PORTFOLIO"><h4>PORTFOLIO</h4></a></li>
Thanks Rakesh