Learn CSS Foundations Projects - CSS Foundations Exercise A

Tell us what’s happening:

Hello, I hope you’re doing well.
I’m having a problem with this exercise
I’m getting the following errors:

You should have an external stylesheet containing the div element styles.

Your div element should have a background-color of red and a color of white.

Your div element should have font-weight set to bold, font-size set to 32px, and text-align set to center.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>Exercise A</title>
    <link href="style.css" rel="stylesheet">

    <style>
      p {
        background-color: green;
        color: white;
        font-size: 18px;
      }
    </style>
  </head>
  <body>
    <div>
      ng elitr, sed diam nonumy e
    </div>

    <p>
o dolores et ea rebum. St
    </p>

    <button style="background-color: orange; font-size: 18px;">
      Click Me
    </button>
  </body>
</html>

/* file: styles.css */
div {
  background-color: red;
  color: white;
  font-size: 32px;
  text-align: center;
  font-weight: bold;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise A

make sure this is happening
check that it is linked correctly

If you have been trying all hints given for this excersice, but failed to get the desired results, i got you covered! please note that the external CSS file can only be applied into to your HTML file by only using <link> element nested inside the <head> elemet.
code removed by moderator

write it like this, and see everything turning out to be good!

happy coding!

hi @Jannydecoder

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.