In regular JavaScript, style names are written in hyphenated-lowercase:

const styles = { 'margin-top': '20px', 'background-color': 'green' };

In React, those same names are instead written in camelCase:

const styles = { marginTop: '20px', backgroundColor: 'green' };

This has zero effect on style property values, only on style property names.



Give your styles object two more properties: a marginTop of 100px, and a fontSize of 50px.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?