# Assignment #### `<input>` tag: ``` <input type="text"> ``` ##### is the main html form tag ,it can be displayed in several ways, depending on the type attribute. #### input types in html: * ` type="text"` used for inline inputs. * `type="password"` used for passwords because the data in it are hidden. * `type ="file"` used to insert a file from the deivce. * `type ="button"` used to add a button to the form. * `type ="color"` it allow the user to select any color. * `type ="date"` used when we want the user to select a date (day/month/year), ex:birthday. * `type ="email"` Used for data of type email. * `type ="month"` allows the user to select a month. * `type ="week"` allows the user to select a week. * `type ="number"` it allows the user to select a number , it has an attribute to specifies the minimum value allowed (min). > [ex : if we want the user age to be more than 18.] * `type ="button"` it add a button to the form. * `type ="submit"` a button that submit the form data. * `type ="reset"` a button that reset the form data. * `type ="tel"` this input type specific for telephone numbers. * `type ="search"` it used as a search engine. > [ ex: like google search.] * `type ="checkbox"` to select data by press on a small box it might look like a to do list , > [ ex: can be used to select your hobbies.] * `type ="radio"` it similar to checkbox but the shape is circle and you cant select more than one. * `type ="datetime-local"` to enter a date and time, with no time zone * `type ="url"` this field used to enter a URL > [it Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards.] * `typer="time"` used for entering a time value with no time zone. * `type="range"` used for entering a number whose exact value is not important. * `type="hidden"` A control that is not displayed but whose value is submitted to the server --- > [Note](/WV2Gd-XURe6Q88x28AiMQQ) > label usaully used with the input tag , and there are some attribute used with it ex: for , id , name --- ###### example: ``` <h1>The input element</h1> <form action=""> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <input type="submit" value="submit"> </form> ``` ##### output : ![](https://i.imgur.com/PChCDhV.png)