Conditional Rendering in React Complete Guide with Examples 2026

Image
  Conditional Rendering in React Conditional Rendering is one of the most useful concepts in React. It means showing different content on the screen depending on a condition. For example: If a user is logged in → show Logout If a user is not logged in → show Login If a student has passed → show Congratulations If a product is available → show Buy Now If data is loading → show Loading... React does not have a separate if rendering tag. Instead, we use normal JavaScript conditions such as if, the ternary operator, &&, and switch to decide what should appear in the UI.

Top 15 HTML MCQ With Answers part(8)

 Top 15 HTML  MCQ With Answers 

Top 10 HTML  MCQ With Answers part(8)


1] heading tag should contain most important keywords for seo use?

    a) <h1>  b) <h7>   c) <h5>  d) <h6>

Answer a) <h1>


2] how does google treat <h1> tags?

  a] primary heading for seo
  b] paragraph
  c] link
  d] goole ignores <h1> tag

Answer a) primary heading for seo

 
3] can <h1> styled using css?

  a)  yes
  b) no

 Answer a) yes


4] what is the purpose of the <q> tag in html language?

  
  a) To display quoted text 
  b) large text
  c) create a blockquote
  d) insert images

Answer a) to display quoted text

5] which attribute is commonly use <q>  tag?

  a) cite
  b) src
  c) alt
  d) href

Answer a) cite

6] which tag is use for long quotations in html language?

  a) <blockquote>
  b) <q>
  c) <em>
  d) <quote>

Answer a) <blockquote>


7) <q> tag is a example?

  a) Block-level element
  d) Semantic element
  c) Inline element
  d) Both d) & C

  Answer d) Both d) & C


8] How can style the <q> tag using css?


  a) q{font-style:italic;}
  b) q:before {content: "[";} q:after { content: "] ";}
  c) All above
  d) q {font-weight:bold;}

Answer c) All above


9] HTML tag is use to define a paregraph?

  a) <p>   b) <para>    c) <text>   d) <paragraph>

Answer a) <p>

 10] <p> tag a block-level or inline element?

     a)Block-level    b) lnline    c) Both    d) none

Answer a) Block-level

11] property controls the space between lines inside a paragraph?

  a) text-spacing   b) word-spacing
  c) text-spacing     d) letter-spacing

Answer d) word-spacing

12] What values can the align attribute of <p> tag?

   
   a) left,right,center,justify    b) start,end
   c) inline, block             d) top, middle, center,justify

Answer a) left,right,center,justify


13] what is the correct center a paragraph using css?

     a) <p align="center">    b) <p align-middle="true">
   c) <p position="middle">      d) <p style="text-align:center;">

Answer d) <p style="text-align:center;">


14] paragraph using css html language?
     

    a) margin      b) gap     c) padding     d) spacing

Answer a) margin


15] CSS property controls the space inside a paragraph?

 
    a) width   b) padding  c) margin    d) line-height

Answer b)padding


Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example