Jump to content

Text - color


_tina_

Recommended Posts

Through external or even internal CSS files. For example:

<p style="color:white;">This is white text</p>
<p style="color:blue;">This is blue text</p>

If you want to reuse your styles, you can do this:

p#white { color:white}
p#blue{color:blue}

<p id="white">This is white</p>
<p id="blue">This is blue</p>

More help at: W3Schools CSS

Link to comment
Share on other sites

Thank you, but won't that put each one on a new line?  Thst i the problem I'm having.

 

Thanks again.

 

Through external or even internal CSS files. For example:

<p style="color:white;">This is white text</p>
<p style="color:blue;">This is blue text</p>

If you want to reuse your styles, you can do this:

p#white { color:white}
p#blue{color:blue}

<p id="white">This is white</p>
<p id="blue">This is blue</p>

More help at: W3Schools CSS

Link to comment
Share on other sites

Through external or even internal CSS files. For example:

<p style="color:white;">This is white text</p>
<p style="color:blue;">This is blue text</p>

If you want to reuse your styles, you can do this:

p#white { color:white}
p#blue{color:blue}

<p id="white">This is white</p>
<p id="blue">This is blue</p>

More help at: W3Schools CSS

That would modify the whole <p> tag.

 

You could use this instead...

<span style='color: #ffffff;'>White Text</span>

Link to comment
Share on other sites

have not checked it, but I think this is right ( the principle is )

 

p #white { color:white}
span p .blue{color:blue}

<p id="white">This is white<span class="blue">This is blue</span></p>

 

This is correct coding but can be simplified and use a class if reusing elsewhere on the same page

 

<p class="white">This is white<span>This is blue</span></p>

 

.white {color:white;}
.white span {color:blue;}

Link to comment
Share on other sites

have not checked it, but I think this is right ( the principle is )

 

p #white { color:white}
span p .blue{color:blue}

<p id="white">This is white<span class="blue">This is blue</span></p>

 

This is correct coding but can be simplified and use a class if reusing elsewhere on the same page

 

<p class="white">This is white<span>This is blue</span></p>

 

.white {color:white;}
.white span {color:blue;}

 

very true, but I did that just in case the op wanted to add more colours or styles within the text  ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.