Create Your First Functional Component in React JS – Beginner's Guide

Image
Create Your First Functional Component in React JS  1. Introduction When you start learning React JS, one of the first things you will come across is the concept of components. At first, components may seem like just another programming concept, but they are actually the foundation of almost every React application. Think about a website you use every day. It may have a header, navigation menu, login form, product section, and footer. Instead of writing all these elements together in one large file, React allows us to create separate parts and manage them independently. These separate parts are called components. In this tutorial, we are going to create our first functional component in React. We will start with a very simple example and gradually understand how components are created, exported, imported, and displayed on a webpage.  2. What Is a Functional Component in React?   A functional component is simply a JavaScript function that returns a user interface using JSX...

Learn HTML Range Input with Practical Examples

 

how to create range input in html


Learn HTML Range Input with Practical Examples


 <input type="range">

 The defines a control for entering a number whose exact value is not important (like a slider control). Default range is 0 to 100. However, you can set restrictions on what numbers are accepted with the attributes below. max - specifies the maximum value allowed.

range input in HTML is created <input type="range"> 

Create a slider control that allows user to select a value with specific range.


how to create range input in html

 Example 


<!doctype html>

<html>

<body>

<h2>Range type</h2>

Age: <input type="number" size="6" name="age" min="18" max="99" value="21"><br>

 Satisfaction: <input type="range" size="2"
name="satisfaction min="1" max="5" value="3">

</Body>

</html>

how to create range input in html

Explain program 

Step 1 ]

<!Doctype html>

  • <!doctype html>  always be the first line of any HTML document.

Step 2 ]

   <html> and </html>

   html  is the root element.

Step 3 ]

<body> and </body>

body  is  main content area.

All visible content inside to  the <body> tag

Step 4]


Age: <input type="number" size="6" name="age" min="18" max="99" value="21"><br>

 Satisfaction: <input type="range" size="2" name="satisfaction min="1" max="5"
value="3">


   input type = number   :-  create number input  field

   size = "6"                     :- set  width of the input 

   name = "age"              :- name use form submitted

    min  = "18", max="99"   :- entered to between 18 &99
    
    Value ="21"                      :- default value shown the page loads 21
 
           

how to create range input in html

 output 

how to create range input in html

Related Post :-

how to create paragraphs in html

how to add line breaks in html

html tag explained how to create table cells

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples