www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] What's the use of <span> tag with no attributes?

  1. #1
    Join Date
    Mar 2007
    Posts
    20

    resolved [RESOLVED] What's the use of <span> tag with no attributes?

    I ran into some pages where you have a lot of tables and inside

    <td class="someclass">

    you have

    <span>1.47 (actual data that displays)</span>

    </td>


    I simply don't get it, what purpose does that empty span tag serve?

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    Just because it doesn't have a class doesn't mean it doesn't have stylings in a CSS sheet. Eg:

    Code:
    td.someclass span {
      font-weight: bold;
    }
    The above code will style the span contained in the td with class "someclass"
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Mar 2007
    Posts
    20
    Thanks didn't know that!

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