Check out example codes for "input types html". It will help you in understanding the concepts better.

Code Example 1

button
checkbox
color
date
datetime-local
email
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week

Code Example 2

<!-- Answer to: "input types" -->

<!--
 Below are all the different input types you can use in HTML!
-->


<!--
  <input type="button">
  <input type="checkbox">
  <input type="color">
  <input type="date">
  <input type="datetime-local">
  <input type="email">
  <input type="file">
  <input type="hidden">
  <input type="image">
  <input type="month">
  <input type="number">
  <input type="password">
  <input type="radio">
  <input type="range">
  <input type="reset">
  <input type="search">
  <input type="submit">
  <input type="tel">
  <input type="text">
  <input type="time">
  <input type="url">
  <input type="week">
-->

Code Example 3

<form>
  <input type="button">
  <input type="checkbox">
  <input type="color">
  <input type="date">
  <input type="datetime-local">
  <input type="email">
  <input type="file">
  <input type="hidden">
  <input type="image">
  <input type="month">
  <input type="number">
  <input type="password">
  <input type="radio">
  <input type="range">
  <input type="reset">
  <input type="search">
  <input type="submit">
  <input type="tel">
  <input type="text">
  <input type="time">
  <input type="url">
  <input type="week">
</form>

Code Example 4

<script>
var x = document.getElementById("demo");
function getLocation() {
  if (navigator.geolocation) {

      navigator.geolocation.getCurrentPosition(showPosition);
  } else {

      x.innerHTML = "Geolocation is not supported by this browser.";

    }
}


 function showPosition(position) {
  x.innerHTML = "Latitude: " + position.coords.latitude + 
  "<br>Longitude: " + position.coords.longitude; 

 }
</script>

Code Example 5

<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">

Code Example 6

<form>
 
First name:<br>  <input type="text" name="firstname"><br>
 
Last name:<br>  <input type="text" name="lastname">
</form>

Learn ReactJs, React Native from akashmittal.com