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

10-13-2007, 05:59 PM

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?

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.

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

Had not thought about it that way, thanks!

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>

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..