css - HTML 5, linking with a div -


at moment have setup similar this:

<a href="#">   <div style="width: 50px; height: 20px;">     <span>blah</span>   </div> </a> 

which works in chrome. fails w3c validation, - ie apparently has issues it.

i've considered using javascript it, know lot of older web-users disable javascript security concerns (personally, i'd stop using old versions of ie. pains)

but wondering, what's html5 approved way this?

before downvotes, i'd reiterate i'm asking specific html 5.

it's valid html5 if fix missing quotation mark in style attribute. try putting in html5 validator:

<!doctype html> <head><meta charset="utf-8"><title>something</title></head> <body><a href="#">   <div style="width: 50px; height: 20px;">     <span>blah</span>   </div> </a> </body> 

enter image description here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -