Learn CSS Foundations Projects - CSS Foundations Exercise A

Tell us what’s happening:

Hi, everybody
I’m stuck on this

// running tests
7. Your p element should have its styles added internally using a style element.
8. Your p element should have a font-size of 18px and have color set to white.
// tests completed
Exercise A
Hello, World

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Click it

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>Exercise A</title>
    <link  rel="stylesheet" href="styles.css">
  </head>
  <body>
<div>Hello, World</div>
<p style="background-color: green;
  color: white;
  font-size: 18px;">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<button style="background-color: orange;
  font-size: 18px;">Click it</button>
  </body>
</html>
/* file: styles.css */
/* styles.css */
div{
background-color: red;
color: white;
font-size: 32px;
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/142.0.0.0 Safari/537.36

Challenge Information:

Learn CSS Foundations Projects - CSS Foundations Exercise A

Hi, and welcome to the forum!

As the error messages indicate, you should use a style element, and that usually goes inside of your head element. What you have used right now is a style attribute which is added inside the opening p tag. Also make sure to add all the styles for your div element.

Good luck!

1 Like

I appreciate that.

I understand

1 Like