[SOLVED] body{background-color: red;} is not working in external css – Stack Overflow

Issue

This Content is from Stack Overflow. Question asked by Chandan Kumar swain

“this is my external css file of name style.css

body{
background-color: red;
}
h3{
color: #66BFBF;
}
hr{
border-style: none;
border-top-style: dotted;
border-color: grey; 
border-width: 3px;  
width: 5%;
}

“And this is my html file of name index.html .in which the style.css linked correctly because hr selector working ,but not others.”

    <!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Chandan's personal site</title>
<link rel = "stylesheet" href ="CSSstyle.css">
</head>
<body>
<h1>This is me!<h1>
<hr>
<h3>Books & Learning</h3>
</body>
</html>     



Solution

It worked when i delete the line out – <lang ‘en’>


This Question was asked in StackOverflow by Chandan Kumar swain and Answered by Chandan Kumar swain It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?