Posts

Showing posts from November, 2023

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.

How to Create Radio Buttons in HTML Step by Step

Image
                HTML Radio button Radio Button information :- Syntax :- <input type ="radio"> Input element use to html forms. The <input> type ="radio"  in radio button. Radio button use to the select exactly only one option  from a list or options. <! DOCTYPE html > < html > < head >     < title > radio buttom </ title > </ head > < body bgcolor = "pink" >     < h4 > input type ="radio" value < br > radio button Use </ h4 >     < form >   < input type = "radio" name = "color" value = "red" > red < br >   < input type = "radio" name = "color" value = "blue" > blue < br >         < input type = "radio"   name = "color" value = "pink" > pink < br >         < input type = "radio" name = "color...

form input types in html

Image
HTML FORM   FORM  information :-   FORM IS CREATED USING <FORM> TAG. 1)  FORM is a window or screen that contains fields or spaces to enter data. 2)  Form is user friendly than generating queries.  3) create tables and insert data fields. 4)  A form can also have button, checkboxes , radio buttons , menus, other input controls. 5)  Form used to submit data to a web server. 6) FORM tag contain various elements as<input>,<select>,<textarea>, <label>,<button> HTML <INPUT > ELEMENT :-   HTML <input> element form element. used to create form fields, input from use .  input control it set to text. Attribute :- 1] Type :-  type input control for text input controls  set to be text ( use r information). 2] name :-   name used control which is sent to the server to recognize the value.   1] html  <Input> element Example :- <! DOCTYPE html > < html > < h...

HTML Description List | with Example

Image
   HTML Description List    HTML Description List  :- Que.  What is dl tag html?                         Description list (dl) tag.                          They are 3 tag used to define description list.                       <dl> ,< dt>  & <dd> tag use.                                       1) <dl> :-   tag use to defines the description list.                     2) <dt> :-  tag used to defines data term /using the element /description                                         ter...

html unordered list

Image
Unordered List HTML Q. what is the  unordered list in  html?  HTML Unordered List :-                       1]   Unordered list is a Bulleted  Format.                    2]  Unordered list starts with the <ul> tag.                    3]  Unordered list end </ul> tag.                    4]  Each unordered list item starts  with the <li> tag.                    5]  Each Unordered list items end with the</li> tag.                Syntax :-            <ul type=" put the list type ">     Que . What is the type  of unordered list in html ?         ...

html ordered list

Image
  HTML List  HTML List :- Different Type  HTML list.                    1] Ordered HTML  List.                   2] Unordered HTML List                    3] Description  HTML List 1] Ordered HTML List :- Q. what is the ordered list in html?       Ordered list is also known as  Number list or alphabetical.     All ordered html list items are marked with the Number in by default.     Ordered list Starts <ol> tag and closing with the </ol> tag.     Ordered list each  item start with <li> tag and closing with the items </li> tag.     Ordered list  represent different Type   1)  Numeric Number(1,2,3,4,5)  2) Capital Roman Number (l ,ll , lll , lV)  3) Small Roman Number( i, ii, iii, iv)  4) Capital Al...

how to add background image in html.

Image
how to insert background image in html Program    Background Image  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Document </ title > </ head > < style >     p { background-image : url ( 'https://cdn.wallpapersafari.com/27/83/hGWHei .jpg' ); <!-- image path --> height : 600px ; <!--height of image-->         width : 50% ;     }     p {         color : red ;         text-align : center ;     } </ style > < body >     < h1 > Background Image </ h1 >     < BR<BR >< BR > < p > < BR<BR >< BR >< BR >< BR > how to insert background image ...