Jump to content

mix colour text


Recommended Posts

using the doctype <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head><meta http-equiv="Content-type" content="text/html; charset=UTF-8" >is it possible to write text in two colours i have tried using elements like <rd></rd> inside divisions but the validator would not accept this.when i tried an id inside a div it would not print on the same line.the original<div class="tex">some text<rd>red text</rd>more text</div>looks ok online but as i said this validator will not accept it.

Link to comment
Share on other sites

There's no such thing as an <rd> element. If you learn CSS you'll find you can put colors anywhere.

<div class="text">Text <span class="mark">Red text</span> Text</div>

In the stylesheet:

.mark { color: red; }

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...