CSS selectors: bgrd color


#1

i use this for body color & can't get confirmation:
whats seems to be the problem? do i need to use the css tab?

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title></title>
	</head>
	<body>
	background-color="#C6E2FF"
	</body>
</html>

#2

Assuming there is one, yes. Check your HTML to make sure the style sheet is linked.

<link rel="stylesheet" href="styles.css"/>

#3

it is, can't find the right way to color the body, can u help?


#4

You need to declare the background-color in the stylesheet.css tab not under index.html

when putting the CSS code in an external stylesheet its different from inline styling..

Example you want to add the color red to a paragraph you will do this:

p{
   color: red;
}

Now follow the same rules ^ for what you want to do

Hope this helps :smile:


#5

i try {body
background-color="#C6E2FF"
body} doesn't work on css tab......


#6

as I showed you:

no = and no " "

you will put it like this:

background-color: THE-COLOR ;

#7

sir, this is what i have, on the css tab it doesn't work

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title></title>
	</head>
	<body>
	background-color:#C6E2FF
	</body>
</html>

#8

I'm a female ..

No you are mixing up HTML & CSS!!!

This is HTML!!! not CSS

in the CSS tab you will just put:

body {  
  background-color: YOUR-COLOR; 
}

^So first you declare the selector, then opening bracket, the code and closing bracket


#9

much tx, i understand now.


#11