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.

html student basic program web designing

            



         HTML FORM

html form is a section of a document which contains controls such as text ,Password fields,  checkboxes, radio buttons,submit tbuton, menus etc.


 Student information basic program

<!doctype html>
<html>
<head>
<title> student form html</title>
</head>
<body>
<h1>student basic information</h1>
<form>
<label for="firstname">First Name:</label><br>
<input type="text" id="firstname" name="firstname"><br>
<label for="lastname">last name:</label><br>
<input type="text" id="lastname" name="firstname"><br>
<label for ="address">Address:</label><br>
<textarea></textarea><br>
<label for="contact num">contact num:</label><br>
<input type="text" id="contact num" name="contact num"><br>
<label for="email">Email</label><br>
<input type="email" id="email" name="email"><br>
<label for="Password">password</label><br>
<input type="password" id="password" name="password"><br>
<label for="gender">Gender</label><br>
<input type="radio" id="gender" name="gender" value="male">Male<br>
<input type="radio" id="gender" name="gender" value="female">Female<br>
<input type="submit" value="submit">
</form>
</body>
</html>
</form>

Form output 

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example