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 Border bottom property Web designing blog

 


    Border bottom property


Border bottom property

1. Border-bottom-style

The Border bottom style property set a style of element bottom Border.

Syntax

 Rear: border-bottom-style: none hidden | dotted | dashed | solid | double groove ridge | inset | outset | initial | inherit;


Border-bottom-style Example 

<!DOCTYPE html>

 <html>

 <head>

 <style>

h1{border-bottom-style: groove; 

border-bottom-color: coral; 

 border-bottom-width: 7px;

}

div { border-style: solid; 

border-bottom-style: groove;

 border-bottom-color: coral; 

border-bottom-width: 7px; }

 </style>

</head>

 <body>

<h1>A heading with a groove bottom border</h1> 

 <div> div element with  groove bottom border.</div>

 </body>

 </html>

Border-bottom-style output 

Border-bottom-style

2. Border-bottom-color

The border-bottom-color property set the color of an element bottom border. Always declare to the border-style or the border-bottom-style property before the border- bottom-color property. An element must have a border before you can change the color.


Border-bottom-color Example 


<! Doctype html>

<html> 

 <head>

<style>

h1 {border-bottom-style: solid;

 border-bottom-color: pink;

h2 {

border-bottom-style: solid;

 border-bottom-color: rgb(20, 176,76);} 

h3 { border-bottom-style: solid;

 border-bottom-color: hsla(89, 45%, 10%,0.5);}

h4 {

border-style: solid;

 border-bottom-color: #92a8d1;} 

</style>

 </head> 

<body>

<h1>A head with a colored bottom border</h1>

<h2>A head with a colored bottom border</h2>

<h3>A head with a colored bottom border</h3>

 <h4>A head with a colored bottom border</h4> 

 </body>

</html>

Border-bottom-color output 


Border-bottom-color



3. border-top-right-radius Property: 


The border-top-right-radius property define the radius of  top-right corner. This property allow  add rounded borders to elements.


Syntax:

 border-top-right-radius: length | % [length | %] | Initial | inherit;

If you set two values  first one is for the top border, and the second one for the right border. If  second value is omitted it is copied from the first. If either length is zero corner is square, not rounded.


border-top-right-radius Example 


<IDOCTYPE html>
 <html>
<head>
<style>

 #border1{
border: 2px solid yellow;
 padding: 10px;
  border-top-right-radius: 25px;
}

#border2{
border: 2px solid red;
 padding: 10px;
 border-top-right-radius: 50px 20px;}

 #border3
 {

border: 2px solid red;
 padding: 10px; 
border-top-left-radius: 25px;
 border-top-right-radius: 25px; 
 border-bottom-left-radius: 25px; 
border-bottom-right-radius: 25px;}
 </style> </style></head> <body>

 <h2>border-top-right-radius: 25px: </h2> 
<div id="border1"> 
<p>The border-top-right-radius property defines  radius of  top-right corner. </p></div>

<h2>border-top-right-radius: 50px 20px:</h2> <div id="border2"> 
<p>If two values  set; the first one is for the top border, the second one for the right border,</p></div><br> 
 <div id="border3">third division </div>

 </body> </html>


border-top-right-radius Output



Border top right radius property


related post :-


html table border

html background color

create menu card

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example