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.

CSS Syntax Explained: Easy Guide for Beginners

Introduction to css Syntax

Introduction to css Syntax


Introduction to css Syntax









  • CSS Selector points  HTML element declaration block contains  one or more declarations 
  • separated by semicolons.
  • each CSS Selector declaration includes a CSS Property name and value ,separated by colon.
  •  CSS multiple  declaration are separated with semicolons
  • CSS element declaration blocks are surrounded by curly braces.

Introduction to css Syntax

Syntax  

selector {
    property: value;

}

Introduction to css Syntax
Example  

<!DOCTYPE html>
<html>
<head>
<title> html css Syntax </title>
    <style>
     p{   color:rgb(0, 8, 255);
        text-align:center;
    }

    </style>
</head>
<body>
  <p>Hello every one</p>
  <p>My Name is web designing theory</p>
  <p>https://webdesigningtheory.blogspot.com/</p>
  <p>learn to programming language</p>
  <p>Easy understand</p>


</body>
</html>



Introduction to css Syntax

Explain Program

Step 1]

<!DOCTYPE html>

  • This declare the document type.
  • browser that the document is written in html
Step 2]

<html>.... . </html>

  • html is the root element of the html page.
  •  Every thing inside it is part of the webpage.
Step 3]

<head> Section

html head contains  information about webpage.
html include CSS styles.
 head section contains metadata about page. not visible on the page itself

Step 4]

<title>

 <title>   tag appears  on the browser tab.
 <title>   tag  use bookmark page name.
 <title>   tag  use title in (SEO)search engine result.
 
Step 5]

 <style>
     p{   color:rgb(0, 8, 255);
        text-align:center;
    }

    </style>

  CSS  internal css use html file.

P                    =   all paragraph (<P>) tag  elements.
color              =   rgb(0, 8, 255) blue color
 text-align     =    center

Step 6]

closing the Tag

   
</style>
</head>

Step 7]

<body>

  • < body> tag  contains all the content visible to webpage.
  • <body> tag contains  all the visible content of the page.
  • inside <body> show the browser screen.

Step 8]

 <p>Hello every one</p>
 <p>My Name is web designing theory</p>
 <p>https://webdesigningtheory.blogspot.com/</p>
 <p>learn to programming language</p>
 <p>Easy understand</p>


html contain  inside a <P> (paragraph) tag

All text is blue

All text is centered

Step 8]

closing the Tag

</body>
</html>

Introduction to css Syntax

Output

Introduction to css Syntax

Related Post :-



Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example