html input example

Example 1: html input types

<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>

Example 2: input tag html

<input type="email" name="name" id="id" placeholder="[email protected]" />

Example 3: how to get the input of a textbox in html

//HTML Textbox w/Getting Javascript Input:
<script>
  function getTextBox(){
    var k = document.getElemntById('myTextBox').value
    alert(k)
  }
</script>
<input type="text" id="myTextBox">
<button onclick="getTextBox()">Get Text Input</button>

Example 4: input html

<!--This text will not be shown -->
<!--Text --> <input type="text">
<!--Text(the input will turn into dots) --> <input type="password">
<!--button --> <input type="button">
<!--number(only a number can be entered) --> <input type="number">
<!--radio button(small and round button) --> <input type="radio">

Tags:

Html Example