Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing text styles with CSS when the text can't be tagged as <p> or a heading

    In what html tag do I specify inline CSS styles?

    In the simplest case, I want to change the text colour of some words in a paragraph, so I do something like:

    Code:
    <tag style="color:#D0D0D0;">Start of paragraph.</tag> Unstyled middle of paragraph. <tag style="color:#D0D0D0;">end of paragraph</tag>
    My question is: what html tag do I put these styles in? Not everything is a <p> or <hx>; what's the equivalent to those for just text?

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,269
    Thanks
    10
    Thanked 277 Times in 276 Posts
    <span> is what you're looking for...

    Dave


  •  

    Posting Permissions

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