Menu
×
×
Correct!

Exercise:

Add the following CSS styles inline to the <h1> element

color = "purple"

const Header = () => { return ( <> <h1 style={{color: "purple"}}>Hello Style!</h1> <p>Add a little style!</p> </> ); }
const Header = () => { return ( <> <h1 style={{color: 'purple'}}>Hello Style!</h1> <p>Add a little style!</p> </> ); }
const Header = () => { return ( <> <h1 style={{color:"purple"}}>Hello Style!</h1> <p>Add a little style!</p> </> ); }
const Header = () => { return ( <> <h1 style={{color:'purple'}}>Hello Style!</h1> <p>Add a little style!</p> </> ); }

Not Correct

Click here to try again.

Correct!

Next ❯
const Header = () => {
  return (
    <>
      <h1 style=>Hello Style!</h1>
      <p>Add a little style!</p>
    </>
  );
}

  
  
  




Completed 0 of 24 Exercises:

React Get Started
React ES6 Arrow Function
React ES6 Variables
React ES6 Array Methods
React ES6 Destructuring
React ES6 Spread
React ES6 Ternary
React JSX
React Components
React Props
React Events
React Conditionals
React Lists
React Hooks useState
React Hooks useEffect
React CSS Styling

×

Reset the Score?

This will reset the score of ALL 24 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 24 React exercises.

Share your score: