Friday, November 19, 2010

What is the html code to put certain text on a colored background?

I want to know how to do html code so that i can have some text on a light blue background, and some text on a light pink background, for a blog i'm creating that has his/her comments... sort of like when you quote someone in a forum, and it shows up on a different colored background (just where the text is) so that you know it's not the writer saying it, but quoted text... sorry if this doesn't make sense... does anyone know what the code is to do this? thank you!What is the html code to put certain text on a colored background?
Hex codes might be good.



Try the link below to get a hex code you want.



Then your codes would look something like this:



(Light blue)



%26lt;div style=';background-color:#8798FF;';%26gt;

Comment goes here.

%26lt;/div%26gt;



(Link pink)



%26lt;div style=';background-color:#FF98C6;';%26gt;

Comment goes here.

%26lt;/div%26gt;



So it's the same code;-just replace the hex codes with the ones you generate. (The hex codes here are 8798FF and FF98C6).



And you don't have to use divs, it can be paragraph tags or whatever. Your choice.What is the html code to put certain text on a colored background?
is this for myspace?

pimp-my-profile.com

you an get everything from there
%26lt;p%26gt;The due date is

%26lt;font style=';background-color: blue';%26gt;next %26lt;/font%26gt;week.%26lt;/p%26gt;



wdw
Don't use font as another person posted- font is an outdated tag.



%26lt;span style=';background:#B0C4DE';%26gt;Your text%26lt;/span%26gt;



B0C4DE is a light blue, a light pink is FFDAB9
Hello,



What i assume you mean is when people are accustomed to seeing portions that have been marked by a highlighter. You can achieve the same effect on your Web page using a Style attribute and BACKGROUND-COLOR. For example, this HTML code inserts a yellow background on the word ';yellow';.





%26lt;HTML%26gt;

%26lt;HEAD%26gt;

%26lt;/HEAD%26gt;

%26lt;BODY%26gt;

%26lt;P%26gt;This highlighted color is %26lt;FONT

style=';BACKGROUND-COLOR: yellow';%26gt;yellow%26lt;/FONT%26gt;%26lt;/P%26gt;

%26lt;/BODY%26gt;

%26lt;/HTML%26gt;



Good Luck!

Sean Colicchio

Server Engineer

Host My Site

http://www.hostmysite.com/?utm_source=bb

No comments:

Post a Comment