melcebu Posted June 17, 2012 Share Posted June 17, 2012 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 More sharing options...
Ingolme Posted June 17, 2012 Share Posted June 17, 2012 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; } 1 Link to comment Share on other sites More sharing options...
eTianbun Posted June 17, 2012 Share Posted June 17, 2012 (edited) By the way, where did you get the <rd /> tag from? Sometimes, i wonder were people get tags from. Edited June 17, 2012 by CodeName Link to comment Share on other sites More sharing options...
melcebu Posted June 17, 2012 Author Share Posted June 17, 2012 got the <rd> from the online course they taught me to use 3.rd{color:red}<div class="rd">text</div> #{color:red}<div id="rd">text</div> rd{color:red}<rd>text</rd> Link to comment Share on other sites More sharing options...
eTianbun Posted June 17, 2012 Share Posted June 17, 2012 Okaaaay! Well, maybe they dont even know what they are doing there! There's nothing like <rd /> in HTML. Link to comment Share on other sites More sharing options...
melcebu Posted June 17, 2012 Author Share Posted June 17, 2012 to be honest i think the course i did was a bit dated and it was inexpensive, looked in my course notes and the rd i used they call contextual selectors so perhaps they are obsolete now. Link to comment Share on other sites More sharing options...
eTianbun Posted June 17, 2012 Share Posted June 17, 2012 (edited) Learn from: w3schools (?). Edited June 17, 2012 by CodeName Link to comment Share on other sites More sharing options...
eTianbun Posted June 17, 2012 Share Posted June 17, 2012 (edited) Post deleted! Edited June 17, 2012 by CodeName Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now