Click to See Complete Forum and Search --> : can a span be self-closing?


johnnyblotter
12-04-2008, 02:01 PM
I just saw this on a website. The person styled the span as a self-closing element, and it appears to work. I guess span can be used that way? Anyone know about this?


<h1><a title="Portimão Global Ocean Race" href="index.php"><span/></a></h1>


#header h1 span {
background:transparent url(images/logo.gif) no-repeat scroll 0 0;
height:125px;
position:absolute;
width:293px;
}

scragar
12-04-2008, 02:05 PM
I know it won't validate, at least not in HTML, XHTML it will, but IE won't like that.