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.

create menu card in html code table format



 how to create  table in html

Program

<!doctype.html>

<html>

<head>

<title>Menu card</title>

</head>

<table border="1">

<tr>

<th>Sr.No</th>

<th>Menu</th>

<th>Price</th>

</tr>

<tr>

<td>1</td>

<td align="center"><u>ice creams</u>

<ol>

<li>juice </li>

<li>Milk</li>

<li>cold coffee</li>

<li>Faluda</li>

<li>Water</li>

</ul>

</ol>

</td>

<td>

<ol>

<li>70</li>

<li>50</li>

<li>80</li>

<li>60</li>

<li>100</li>

</ol>

</td>

</tr>

<tr>

<td>2</td>

<td align="center"><u>Drinks</u>

<ol>

<li>chocolete </li>

<li>kulfi</li>

<li>strawberry</li>

<li>Mango</li>

<li>Butterscotch</li></ul></ol>

</ol>

</td>

<td>

<ol>

<li>50</li>

<li>20</li>

<li>80</li>

<li>60</li>

<li>80</li>

</ol>

</td>

</tr>

<tr>

<td>3</td>

<td align="center"> <u>Break-fast</u>

<ol>

<li>poha</li>

<li>Upma</li>

<li>dosa</li>

<li>Rava</li>

<li>Thalipeeth</li>

</ol>

</td>

<td>

<ol>

<li>40</li>

<li>50</li>

<li>70</li>

<li>30</li>

<li>80</li>

</ol>

</td>

</tr>

</table>

</html>


OUTPUT

create menu card in html code

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