+ 9
They say that inline level elements cannot contain block level elements.
But below is an anchor link which contains h1 element. It is still clickable. <a href="#"><h1>Click</h1></a>
2 Réponses
+ 9
yes, it works. but it's invalid html.
browsers aren't that strict, so they interpret the page as it's intended. it would be funny and a horror if they'd display error messages instead...
+ 3
you can make inline element a block level then use block level tags inside it
a{
display:block;
}