Learn Basic CSS by Building a Cafe Menu - Step 16

Tell us what’s happening:
i need help linking my style.css page to my html page.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<!-- User Editable Region -->

  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <a href="link/styles.css">stylesheet</a>
  </head>

<!-- User Editable Region -->

  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
/* file: styles.css */
h1, h2, p {
  text-align: center;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 16

Link to the challenge:

2 Likes

When unsure about how something works, it helps to find outside sources such as references.

This is one I like to use when I forget how to link
It has code examples

1 Like

Your on the right track! Change ‘a’ to ‘link’ after add ‘rel=“stylesheet”’. Then in the ‘href=’ get rid of the ‘link/’ and ‘stylesheet’ and the ‘/a’. Try that.

1 Like

Thank you very much, i appreciate the detailed explanation. Its done now

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.