Jump to content

How To Add Color In Post


Chikwado

Recommended Posts

  • 3 weeks later...

From as much as i have learned i know these tags :

 

a) IF through HTML then u can use this tag:

<font color="green">Web technology</font>   <!-- The text "Web technology" will be in green color-->

b)through CSS, u can make a class for it:

.d1                                     <!-- d1 is the name of the class-->
{
    background-color:black;             <!-- This tag will add a background color to your text/div/para-->    
    color:green;                        <!-- This tag will add a color to your text-->
}
Link to comment
Share on other sites

It must be an old edition.Thank you for the info

 

 

Not necessarily an old addition, textbook are always well behind the curve; or it might just be a lazy editor, not bothering to check anything except spelling and grammar.

 

 

Anyway back on topic, just add a css class:

 

.hilitePost { color:red;}

 

And apply it to the text you want red with a span

Edited by COBOLdinosaur
Link to comment
Share on other sites

  • 4 weeks later...

My question was different with the answer that were been pushing in. The text with red color that you found above was that, when I made the post I used bbcode tag and it generated html tag, why? If you view html source of that post it generated something like this:

<span style="bla bla hash red color">Red color display here</span>
Can you tell why it generate that html tag, because i did not input that while making the post. Edited by Chikwado
Link to comment
Share on other sites

The browser cannot process BBcodes. On the server there is scripting to convert the BBcodes to HTML. BBCodes are used, because allowing HTML codes in postings is a security risk. For some very primitive implementations of BBcode to HTML it is possible to use javascript to do the replacement and then re-write the page, but that is pretty much worthless because the post needs to go to the server to be saved; and very few developers would accept the text containing HTML without stripping it and sanitizing the post before it is sent to the DB.

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...