About Me
So im having some trouble with the challenge and i spent 30 minutes on google trying to figure it out yesterday. Can anybody help me make colored text boxes in html?
KeaganLandfried (34)
If you are trying to change the color of the text, use:<font color="insert_color">This is some text!</font>
However, if you are trying anything more, I suggest using a CSS file.
Please upvote and mark as answered if I answered your question. :)
LittleNomster (112)
@KeaganLandfried im new and dont think its possible to make a colored text box in css
mat1 (4368)
@KeaganLandfried <font> is deprecated and should never be used. Use CSS (style attr if you want it inline) instead.
Could you link a repl or add a little detail? Are you trying to make text colored, or the background? What elements are you using for it?
@maazzubair99 im talking about making a text box filled white
@LittleNomster you will have to put the text inside a
<div></div>
tag. So something like this:And then in your css, you could do:
to make the background white
@maazzubair99 k ima go try it thanks
@LittleNomster no problem. if it doesn't work let me know.
@maazzubair99 it worked thanks i wish i could mark two people
@LittleNomster marking two people would be great
you could also change the id to whatever you like, it doesnt have to be randomDivId. Just remember to change the css too
@maazzubair99 kk <3