React Interesting Quizzes! - 17/04/2023

Hello Everyone!
Here I am having some interesting questions for you!
Please reply your answer!

  1. What is the purpose of using CSS in React?
    a. To style the HTML elements
    b. To add functionality to the React components
    c. To create new components
    d. To handle server-side rendering
  2. Which property is used to set the background color in CSS?
    a. color
    b. background-color
    c. background
    d. background-image
  3. Which is the correct way to add a CSS class to a React component?
a. <Component className="my-class" /> 
b. <Component class="my-class" />
 c. <Component cssClass="my-class" /> 
d. <Component classList="my-class" />
  1. What is the benefit of using CSS Modules in React?
    a. It allows for scoped CSS styling
    b. It allows for global CSS styling
    c. It allows for inline CSS styling
    d. It allows for dynamic CSS styling
  2. What is the purpose of the “style” attribute in React?
    a. To add inline styles to an element
    b. To apply external CSS styles to an element
    c. To define a new CSS class
    d. To add functionality to an element
  3. Which property is used to set the font size in CSS?
    a. font-size
    b. size
    c. font
    d. text-size
  4. Which CSS selector is used to select all elements with a specific class?
    a. #
    b. .
    c. %
    d. :

Thanks & Regards
TA- Dharshini M
Have a Happy Learning! :grinning:

1 Like

@dharshini-ta-fsr
Q1-Ans-a. To style the HTML elements
Q2-Ans-b. background-color
Q3-Ans-a.
Q4-Ans-a. It allows for scoped CSS styling
Q5-Ans-a. To add inline styles to an element
Q6-Ans-a. font-size
Q7-Ans-b. .