0

I NEED A CODE TO CHANGE BACKGROUND COLOR

optional::can I have two background colors at a time

7th Oct 2016, 10:51 AM
Mohammed Bangi
Mohammed Bangi - avatar
9 Antworten
+ 3
In CSS you can use it: body { background-color: green; }
7th Oct 2016, 7:44 PM
hadi momen
hadi momen - avatar
+ 3
Yeah don't use bgcolor, ever! Use CSS instead. Arav's answer works, but the clean way to do it is like this: <html> <head> <style> body{ background-color: rgb(255,0,0); } </style> </head> <body> </body> </html> Your background will now be red.
10th Oct 2016, 5:30 PM
Baraa AB
Baraa AB - avatar
+ 2
for changing background color <body bgcolor= red> instead of red try any other colors
8th Oct 2016, 11:06 AM
deep
+ 1
You can have 2 background at a time but You must use it in different tag if same tag it will set to last code background ummm...I'm not good at english sorry code : HTML use tag <anyTagElse bgColor = #RRGGBB> JS Use inside tag script and in html tag <script>document.(element of tag).style.backgroundColor = "#RRGGBB";</script> CSS I havent learned yet but I see something use <anyTagElse style = "background-color:#RRGGBB"> in side html tag
7th Oct 2016, 11:58 AM
DK-deadAnzle
DK-deadAnzle - avatar
+ 1
ok
7th Oct 2016, 12:14 PM
Mohammed Bangi
Mohammed Bangi - avatar
+ 1
You can use this in css /* change the background of the body to light gray */ body { background-color:#eee; } ......…........……………… 😀😀😀😀😀😀😀
7th Oct 2016, 8:48 PM
Mohammed Omran
Mohammed Omran - avatar
+ 1
the attribute background-color: ; can be used in any tags to change the bgcolor for particular section..<body background-color: ;> will change entire background of the page .
17th Oct 2016, 7:19 AM
Ajith
Ajith - avatar
+ 1
what tag are you trying to change background?
22nd Oct 2016, 7:30 PM
Jecris Lara
Jecris Lara - avatar
0
<body bgcolor="green">
10th Oct 2016, 3:20 PM
abin george