I am new to HTML and CSS, here I had tried inline CSS(when external one was not working), also tried it in Codepen and both were working. I want the External CSS to run on brackets. I am confused if it was a linking error or have I missed anything ?
Here is the code :
index.html :
<!doctype html>
<html>
<head>
<title>The CSS Basics</title>
<link ref="stylesheet" href="main.css">
</head>
<body style="background-color: #cc99ff">
<h1 style="color:aliceblue; text-align: center;">Skateboarding is Awesome!</h1>
<div class="square"></div>
</body>
</html>
main.css:
.square{
width: 100px;
height: 100px;
background-color: azure;
margin:auto;
}
2
Answers
link rel="stylesheet"
just change ref to rel in your link.
also i wouldnt recomend you to use inline styling, instead, use either embedded or external styling.