www.webdeveloper.com
Results 1 to 2 of 2

Thread: can a span be self-closing?

  1. #1
    Join Date
    Nov 2006
    Posts
    198

    can a span be self-closing?

    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?


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

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

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    I know it won't validate, at least not in HTML, XHTML it will, but IE won't like that.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles