Key Concepts

Review core concepts you need to learn to master this subject

React CSS Styles

// Passing the styles as an object const color = { color: 'blue', background: 'sky' }; <h1 style={color}>Hello</h1> // Passing the styles with an inline object, as a shorthand <h1 style={{ color: 'red' }}>I am red!</h1>

React supports inline CSS styles for elements. Styles are supplied as a style prop with a JavaScript object.

Style
Lesson 1 of 4

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo