Use bgcolor or background-color/background? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Use bgcolor or background-color/background?

Realy, I don't understand where i can use one or another. I've read last of them is css language, but can I use both anywhere?. Thank's

26th May 2018, 9:42 AM
TELARES telares
4 Answers
+ 2
Oh okay, in that case, bgcolor is an HTML attribute, whereas background-color is CSS. You can't use background-color in HTML, or vice-versa. However, I would highly recommend you to start using CSS if you're into web designing, as attributes such as bgcolor aren't used anymore since CSS was introduced. Also, it isn't very hard to get started with :) You can start with the sololearn CSS course: https://www.sololearn.com/Course/CSS/
26th May 2018, 10:33 AM
Just A Rather Ridiculously Long Username
+ 2
Here is a relevant thread: https://stackoverflow.com/questions/36863849/what-should-use-bgcolor-or-background-color Note that googling questions like these is a good idea; this was the first result :)
26th May 2018, 9:52 AM
Just A Rather Ridiculously Long Username
0
Yes, I saw this, but I'm in html only (not css yet), the question is, Can I use in html both indiscriminately?. thank's for the answer
26th May 2018, 10:07 AM
TELARES telares
0
Ok, I'll do. Thank's.
26th May 2018, 10:36 AM
TELARES telares