HTML AND CSS Wont't Work

Hello, I was working on the HTML cheat sheet and when I link my HTML and CSS it does not seem to work. My code is this

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <link href="styles.css" type="text/css" rel="stylesheet">
    <title>Coding</title>
</head>
  
<body>
  <h1>How to Code a Website</h1>
</body>
</html>

CSS:

h1{
  text-align: center;
}

Hello! I pasted your code into my own system, and it worked fine. :slight_smile:

Have you named your CSS file styles.css? And is it stored in the same folder as your index.html?

2 Likes