(Im using visual studio code) this is html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<link rel="stylesheet" href="css/maincss">
</head>
<body>
<h1>Title</h1>
<p class="mainp">Paragraf</p>
</body>
</html>
and this is css part
.mainp {
color: aqua;
}
color in the website is not changing i also tried it with color does not change
p {
color: aqua;
}
i want to change my font color but it is not changing
3
Answers
Make sure your CSS
.mainp {
color: aqua;
}
is in a file named main.css in the folder css
2. Change your css link to this
note the filename: main.css rather than maincss
Make sure your CSS filepath is "css/main.css", maybe you forgot a period (typo)?
In your html code, you have attached a wrong file , you have mentioned file as css/maincss , which should be main.css . Below is the correct code
Also make sure you have a file named as main.css inside css folder