Posts

Showing posts from December, 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.

html datetime picker

Image
 html datetime  picker ஃ  datetime  tag html       syntax : <input type="datetime-local">   i]  The  datetime result value  include  the year, month, day, time.  ii]  Datetime  input type  add the <label> tag use best accessible.    iii]  html element represents a specific time.  iv]   Html tag use to define date and time.  v]   Display time value 24 hour clock or date in calendar in HTML.  vi]   datetime used to define machine-readable date/time with time element.  datetime Value description    YYYY  :-   Four digit year ( 01 to 12)   MM      :-  Two digit month  (01 to 31)   DD       :-   Two digit day  (01 to 31)    T          :-   Time value     HH      :-...

html color tag

Image
html color tag ஃ color tag syntax :     <input type="color">     1]  Html is used to create a color picker.   2]   Used to select a color from a visual interface.   3]   The value of the tag is always a seven character         string in the format  eg- #FFA07A   4]   select user  use a specific color.          Html program                  html color tag <! DOCTYPE html > < html >     < head >       < title > HTML color tag </ title >     </ head >         < body >       < form >       < h2 > select your favorite color </ h2 > < br >       < input type = "color" name = "upclick" value = "#D35400" >< br > upclick < ...

file upload html

Image
File Upload  :-      <input type="file">    html form tag  Attribute     ஃ   The html file tag is used to upload any file to server.   ஃ   Form gives  option to upload any file such as image, resume audio etc. to the server.   ஃ File input tag.   ஃ <input> element  use type = "file"    ஃ The user choose one or more files form device storage.  SYNTAX:           <input type="file">   HTML program                   File Upload  <! DOCTYPE html > < html > < head >         < title > select file   </ title > </ head > < body >     < h2 > file to upload </ h2 >     < form >         < label > file upload </ label >         < ...

How to Add Line Breaks in HTML

Image
                     Line Break information 1]    A line break ends the line you are currently on and resumes on the next line. Placing <br /> within the code to break the line. Use the <br /> tag within the <p> (paragraph) tag. 2]   A line break is marked up as follows: 3] html <br> tag inserts  single line break.  4] The <br> tag is an empty tag which means that it has no end tag. 5] The <br> tag is an empty tag which means that it has no end tag.  6] The <br> tag is useful for writing addresses or poems. 7] <br> tag to enter line breaks, not to separate paragraphs.   Syntax :                       </br> Line Break       program <!DOCTYPE html> <html>  <body> <p>  To break lines<br>in a text,<br>use the br element.  </...

html drop down button

Image
drop down button   Drop  down list  create a <select>  element  is use. The name attribute is  reference the form data after the form is submitted  The id attribute is needed to associate the drop down list with a label.  id attribute is need to drop down list with  label. The <option> tag inside the <select>  element define the available options in the drop down list.   DROP DOWN LIST            Important attributes   Html program         drop down list <! DOCTYPE html > < head >         < title > drop down list html </ title > </ head > < body >     < h2 > drop down list create in html </ h2 >     < form >     < label for = "game" > Choose a games </ label >         < select name = "game" id = "game" >   ...