Naming Convention

HTML tags always use lowercase tag names, while React components start with Uppercase.

Note − You should use className and htmlFor as XML attribute names instead of class and for.

This is explained on React official page as −

Since JSX is JavaScript, identifiers such as class and for are discouraged as XML attribute names. Instead, React DOM components expect DOM property names such as className and htmlFor, respectively.

Styling in JSX
ReactJS Components

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?