HTML part 3

Label:

  • It is used to tell the user what to enter in the input box.
  • It is best to connect label with input using for and id.
  • When the user click on the label, input gets focused.

Example :

for="email">Email: type="email" id="email">

for="password">Password: type="password" id="password">

Button:

  • It is used to perform an action when clicked like submitting form and resetting form.

Types of button:

  • button
  • submit
  • reset

*Example : *


 type="button">Normal
 type="submit">Submit
 type="reset">Reset

select:

  • It is used to create drop down list.
  • It allows users to choose one or more options.

Example :

 for="city">Choose City:
 id="city">
    Chennai
    Delhi
    Mumbai



 name="city">
     value="chn">Chennai
     value="del">Delhi


Here the value is what gets sent to server.

For Multiple Selection :

 multiple>
    HTML
    CSS
    JavaScript

Option:

It is used to define items inside a dropdown.
It can have value attribute.
We can mention default selected option.
We can disable a option.

Example :


Textarea:

  • It is used to take multline input from user.

Example :

for="feedback">Feedback:
id="feedback" name="feedback" rows="5" cols="30" placeholder="Enter your feedback here">

type="submit">Submit
Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

GTM on a budget: do more with less | GTM Labs

Next Post

Futureproofing Quality: Trends in Digital Color and Appearance Management

Related Posts