...

View Full Version : <hX> - Block-level elements and links?



CaptainB
10-13-2007, 05:59 PM
Hi!

Is it correct that <hX> is a block-level element?

If so, the W3C validator won't allow me to insert the a href tag around it. How would I then link it?

Fang
10-13-2007, 06:18 PM
Give the anchor the same display values as the Hx element.
Adding an onclick handler to the Hx would allow you to keep the Hx, but JavaScript disabled browsers would have no link.

CaptainB
10-13-2007, 06:25 PM
Fang, thanks for the answear.

Had not thought about it that way, thanks!

_Aerospace_Eng_
10-13-2007, 06:59 PM
Unless I missing something why not just put the link inside of it?

<hX><a href="#">Some link</a></hX>

CaptainB
10-13-2007, 07:05 PM
Oh boy...I feel embarassed!

Thanks Aerospace! It's amazing how easy "easyness" can cheat you once in a while..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum