Use or deprecation of the Span tag

Discussion in 'CSS' started by jeffduck, Oct 4, 2010.

  1. #1
    Is the Span tag actually deprecated or just not considered good form?

    I recently had someone rewrite a small 10 year old site for me using XHTML and CSS2 with the sole intention of modernizing the code and updating some graphics. What I received included a CSS file but also extensive use of the span tag along with excessive use of tables.

    After doing a little reading, it looks like the span tag isn't actually deprecated so I don't know how to quantify or specify 'good code' vs. what I feel is 'old code'.

    Thanks for any direction you can give me.
     
    jeffduck, Oct 4, 2010 IP
  2. Jaden-Ellett

    Jaden-Ellett Peon

    Messages:
    55
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To be honest, any excessive use of tables is not really the latest web trend. Most website nowadays are written using Xhtml + Css, and are designed by a CSS layout. (a layout not controlled by tables). Would you mind giving me a URL to the website so I can inspect the code and give you more details? Or some sample code from index.html?
     
    Jaden-Ellett, Oct 4, 2010 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Span is not deprecated and is still widely used, but it should be limited to styling inline elements (e.g. highlighting part of a sentence).
    Tables should only be used for data presentation and not for site layouts.
     
    Cash Nebula, Oct 4, 2010 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I think developers of HTML has created tags for specific requirements and want us to use them when it is required, if it is needed to use an inline element <span> tag why not to be used.
     
    radiant_luv, Oct 4, 2010 IP
  5. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    Thanks folks,

    Expanding on my question, here's a different example of the code that was developed for me. I think posting this code will make my broader question more clear.

    <td align="left" valign="top" bgcolor="#000000"><table width="600" border="0" cellspacing="1" cellpadding="1">
    <tr>
    <td width="120" height="25" align="center" valign="middle" class="tableHeading"> Apply to: </td>
    <td width="120" align="center" valign="middle" class="tableHeading"> Title: </td>
    <td width="120" align="center" valign="middle" class="tableHeading"> Viewing Size: </td>
    <td width="120" align="center" valign="middle" class="tableHeading"> Time: </td>
    </tr>
    Code (markup):
    How can I write a short and simple bid request for a very small project that says what I need (good and modern code - tables only used for tables, attributes only in stylesheets, etc.) without saying a lot of "don't do this" or "don't to that"?

    Thanks again.
     
    Last edited: Oct 5, 2010
    jeffduck, Oct 5, 2010 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just copy what the web developers say on their sites:
     
    Cash Nebula, Oct 5, 2010 IP
  7. Linkadoodle

    Linkadoodle Guest

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Span isn't deprecated, it's really still a great tool, although CSS has improved and replaced it even in many ways, it is somethimes still my last rufuge for styling. Particularly with complex CSS files.
     
    Linkadoodle, Oct 6, 2010 IP
  8. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #8
    what would you use other then SPAN to highlight a specific word or phrase within a paragraph, assuming span is deprecated? Google still uses span on a regular basis... and if anyone knows then they must...
     
    camjohnson95, Oct 6, 2010 IP