#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    660
    Rep Power
    31

    Add span tags or classes to text that have no tags?


    Is there any way of forcing the addition of span tags or classes to text on a page that has no p, a, span tags, etc. I want to style these text.

    eg.
    Code:
    <table>
    <tr>
    <td>I have no tags</td>
    <td><p>I have tags</p></td>
    </tr>
    </table>
    I considered just directing my styles to the table or td tags, but it would also affect other tables content, like the p tag in my sample.

    Thanks
  2. #2
  3. Old Fart
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Location
    Chicago
    Posts
    97
    Rep Power
    4
    I am not sure just what you wish to accomplish here. What do you mean by "span tags"? Do you mean <span> and </span>?

    If so then the jquery .html() and .append() functions may be what you want.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    5
    Rep Power
    0

    Question is not clear


    Hi,

    Please be specific in whatever you want to achieve.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo