Learn CSS Foundations Projects - CSS Foundations Exercise A

Tell us what’s happening:

I get that this condition is not fulfilled:
“Failed:The div element should have its CSS added externally.”

connecting external css means that I connect a new css file to the html file.
that’s why I wrote “div”'s css attributes inside the file styles.css

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="styles.css" type="text/css">
    <title>Exercise A</title>
  </head>
  <body>
    <div>ABC</div>
    <p>ABC2</p>
    <button style="background-color:orange; font-size:18px;">Submit</button>
  </body>
</html>


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

 p {
  background-color: green;
  color: white;
  font-size: 18px;
}

Your browser information:

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

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise A

you have done nothing wrong, it’s a bug, let me report it

The p element styles should be applied internally not externally.

If I write in the html file:

<style>
p{
......}
</style>

and run tests, I get more bugs…
(although I believe that’s what was supposed to be the right answer)

Post all your new code. Both the HTML and CSS.

Edit: did you put the style element in the head element?

I don’t know if you solved the problem but try this
<title>Exercise A</title>
<style>
p{
......}
</style>

it work for me