Klaus Mana Klaus Mana - 2 months ago 9
CSS Question

CSS background-color won't work?

So, I am REALLY noob in CSS, as in I have only used it only 1 or 2 times. When i try to changethe body's bg color, it doesn't change at all.

Here is my HTML code:


<html>
<head>
<link rel = "stylesheet" src = "CSS/main.css">
<title>
TESTTITLE
</title>
</head>
<body>
<h1>TEST</h1>
</body>
</html>


And here is the CSS:

body {
background-color : aliceblue;
}


I know this is pretty simple, but I am really a beginner in the whole front end thing.

Answer

You mis-used src.

CSS

<link rel="stylesheet" type="text/css" href="css/main.css">
Comments