#Can I make an external style sheet /and/ an html webpage in a single W3schools space?

2 messages · Page 1 of 1 (latest)

frozen roost
#

I just started working on my first website in a W3Schools space. I used the "new root file" to create a .css file to use as my eternal CSS page. When I go to preview the page, styles from the CSS page are not reflected in the preview. I think I'm missing something but I don't know what. I don't think the CSS link in the html page is wrong. Am I just fundamentally misunderstanding how this works? Markdown to follow.

In the html page:

<html lang="en">
<head>
<link rel="stylesheet" href="https://spaces.w3schools.com/space/chefgregtesting/chefgregstyle.css" >
<title>Chef Greg's Website</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>

<div class="header">
    <h1>Chef Greg</h1>
    </div>```

The CSS:
``` header {
  padding: 80px; /* some padding */
  text-align: center; /* center the text */
  background: #1abc9c; /* green background */
  color: white; /* white text color */
}

/* Increase the font size of the <h1> element */
header h1 {
  font-size: 40px; }```

(I have also tried replacing the url with `href="https://chefgregtesting.w3spaces.com/chefgregstyle.css"`)
floral mauve