Go to w3schools.com
Close the exercise
More React Exercises
Close menu
Go to w3schools.com
Sign in to track your progress
×
Sign in

React Exercises

Get Started3 q
ES6 Arrow Function3 q
ES6 Variables3 q
ES6 Array Methods3 q
ES6 Destructuring3 q
ES6 Spread3 q
ES6 Ternary3 q
JSX5 q
Components3 q
Props3 q
Events3 q
Conditionals3 q
Lists3 q
Hooks useState3 q
Hooks useEffect3 q
CSS Styling5 q


by w3schools.com











Exercise: React CSS Styling





Wrong Answer!













Completed

You have already completed these exercises!

Do you want to take them again?










×
Close the exercise

Congratulations!


You completed the React CSS Styling Exercises from W3Schools.com



Share on:






Consider the following code:
const Header = () => {
  const myStyle = {
    color: "white",
    backgroundColor: "DodgerBlue",
  };
  return (
    <>
      <h1>Hello Style!</h1>
    </>
  );
}


What is a correct syntax for using myStyle as styling for the <h1> element in the return function?