View Single Post
Old 07-06-2015, 04:03 AM  
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,094
sadly, you can't add any <a> tag around divs and pass validation.. what you can do is changing the DIV tag to SPAN and you will be good to go...

Before:
Quote:
<a href="http://www.google.com/" title="test"><div id="content">This is a test</div></a>
After:
Quote:
<a href="http://www.google.com/" title="test"><span id="content">This is a test</span></a>
You can always check your code at
https://validator.w3.org/check

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<a href="http://www.google.com/" title="test"><span id="content">This is a test</span></a>
</body>
</html>
Hope it helps.
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote