Learn CSS Foundations Projects - CSS Foundations Exercise A

The div element should have its CSS added externally.
Failed:The p element should have a font-size of 18px.
Failed:The p element should have its style added internally.

Can’t find the mistake, help pls

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="styles.css">
    <title>Exercise A</title>
  </head>
  <body>
    <div>
      Hi!
    </div>
      <style>
      p{
        background-color: green;
        color:white;
        font-size: 18px;
      }
      </style>
      <p>Hi</p>
      <button style="background-color:orange;font-size:18px;">Submit</button>
  </body>
</html>
/* file: styles.css */
/* 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise A

are you sure you have added your style to the right place?

1 Like

Wow such a moron… hahahah thanks!

I need to know if there is still a bug where this particular question is concerned. It is saying that (i) the div element should have its CSS added externally (ii) the p element should have a font size of 18px and (iii) the p element should have its style added internally.

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="styles.css" type="text/css" />
    <title>Exercise A</title>
  </head>
  <body>
    <div>This is div text</div>
    <p>This is paragraph text</p>

    <style>
      p {
        background-color: green;
        color: white;
        font-size: 18px;
      }
    </style>
    <button style="background-color: orange; font-size: 18px">Click</button>
  </body>
</html>
div {
  background-color: red;
  color: white;
  font-size: 32px;
  text-align: center;
  font-weight: bold;
}