Skip navigation
Currently Being Moderated

Text paragraph

Dec 30, 2012 10:47 AM

Can some one tell me the mos simple way to change the color of text on one line or one word only, in a paragraph please. thank you Jeff

 
Replies
  • Currently Being Moderated
    Dec 30, 2012 11:07 AM   in reply to Jeffrey54 Lane

    Use CSS classes with <span> tags.

     

    CSS:

    p {color:black}

    .red {color:red}

     

    HTML:

    <p>This is black<span class="red">this is red</span>and this is black again.</p>

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 30, 2012 11:42 AM   in reply to Jeffrey54 Lane

    You could also do this using simple html, may be a little easier if you are not familiar with cascading style sheets.

     

     

     

    <font color="red">Text in here red color will be applied</font>

     

    So to do in a paragraph for a simgle phrase Lorem Ipsum

     

    is simply dummy text of the printing and typesetting industry. <font color="red">Lorem Ipsum</font> has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,

     

    http://www.helpvid.net/html/html_fonts.html

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 30, 2012 11:59 AM   in reply to helpvid
    <font color="red">Text in here red color will be applied</font>

     

    HTML <font> tags are deprecated and will cause code errors in all modern web documents.   Best practice is to keep styles separate from content as much as possible. 

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 31, 2012 10:06 AM   in reply to Jeffrey54 Lane

    Can you do the same sort of thing with the H1, H2 and so on?

    Yes.

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 31, 2012 11:35 AM   in reply to Jeffrey54 Lane

    Re-usable CSS classes:

         .red {color:red}

         .green {color:green}

     

    CSS selectors:

         h1, h2, h3, p {color:black}

     

    HTML:

         <h1>Heading 1 <span class="red">this is red</span></h1>

     

         <h2>Heading 2 <span class="green">this is green</span></h2>

     

         <p>Paragraph <span class="red">red</span>

         <span class="green">green</span> normal.</p>

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points