• I am trying to highlight a date within a line of text by coloring it red. The line currently reads…

    <div>Date:Saturday July 12th, 2008</div>

    and looks like this

    Date: Saturday Jul. 12th, 2008

    I would like to put THIS SATURDAY! in red color. How can I change the line of code so that
    a) the text I want is in Red Color
    b) All of the text remains in BOLD face
    c) All of the text appears on one line

    I used this line of code, but it did not give me b or c

    Date:<div style=”color:red”> THIS Saturday</div>Jul.
    12th, 2008

    Please advise!

    Thanks

Viewing 1 replies (of 1 total)
  • To change colour but keep it uninterrupted, a span works best.
    Put this in place of “Date”

    <span class="redtext">Date</span>

    Edit your CSS to add this

    .redtext
    {
    color: red;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘changing text color in the middle of a line’ is closed to new replies.