🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: React Basics: all 10 questions

Quiz: React Basics · Question 1 of 10

In JSX, which attribute replaces HTML's class?

In JSX, which attribute replaces HTML's class?

  1. A.class
  2. B.className
  3. C.cssClass
  4. D.style
Answer & explanation

Correct answer: className

class is a reserved word in JavaScript, so JSX uses className.

Can you get the rest right without peeking?

Take the timed Quiz: React Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →