Complete the code to use the correct JSX attribute for CSS classes.
<div [1]="container">Hello World</div>
In JSX, className is used instead of class to assign CSS classes.
Complete the code to correctly write a self-closing tag in JSX.
<img src="logo.png" [1]>
In JSX, self-closing tags must end with /> to be valid.
Fix the error in the JSX code by choosing the correct attribute for inline styles.
<div [1]={{ color: 'red' }}>Text</div>
In JSX, the style attribute accepts a JavaScript object for inline styles.
Fill both blanks to correctly write a JSX event handler for a button click.
<button [1]=[2]>Click me</button>
JSX uses camelCase event names like onClick. The handler is passed as a JavaScript expression without braces inside the attribute value.
Fill all three blanks to correctly write a JSX fragment with two paragraphs.
<>[1][2][3]<p>Second paragraph</p></>
JSX fragments allow grouping without extra nodes. Paragraph tags must open and close properly around text.