HTML input labels - HTML form - Guide to HTML, XHTML Guide

Change Font Size: / / Directory List

10.2. HTML input labels

10.2.1. HTML type attribute
10.2.2. HTML checked attribute
10.2.3. HTML disabled attribute
10.2.4. HTML readonly attribute
Input labels - on behalf of HTML form of a single input field
  • There is a separate input labels, <input />
  • Attribute.
    • Common - general attributes
    • Type - on behalf of a domain input is displayed (divided into imported, select type, click type)
    • Maxlength - input domain can enter up to the length of text
    • Src - When using a picture to express button, a representative picture of the location ( URI )
    • Alt - Tips representative form text, when the mouse stay
    • Size - the length of input domain
    • Value - the value of imported domain
    • Accesskey - Form Shortcuts visits
    • Checked - if the choice of the input domain, has been the representative of choice
    • Disabled - lack of access to the importation of domain focus, no choice, grey, in the form can not afford any role
    • Readonly - input domain can choose, but can not be amended
    • Tabindex - enter the domain "tab" key to traverse sequence
  • Trackback Address: http://www.nt22.com/xhtml-html/tag_input/

Example

  "nt22" Action <form id = = = "nt22.php" method "multipart/form-data" "post" enctype => <fieldset> <legend> user name and password: </ legend> <input id = "hiddenField" name = "hiddenField" type = "hidden" value = "hiddenvalue" /> = <label for "username" /> User: </ label> <input type = "text" id = "username" name = "username" value = "nt22" size = "15" maxlength = "25" /> = <label for "pass" /> Password: </ label> <input type = "password" id = "pass" name = "pass" size = " 15 "maxlength =" 25 " /> </ fieldset> <fieldset> <legend> Sex: </ legend> = <label for "sex" /> F </ label> <input type =" radio "value =" 1 " id = "sex" name = "sex" /> = <label for "sex" /> F </ label> <input type "radio" value = = = "sex" name "2" id = "sex" /> < label for = "sex" /> confidentiality </ label> <input type "radio" value = = = "sex" name "3" id = "sex" /> </ fieldset> <fieldset> <legend> Hobbies: </ legend> = <label for "fav" /> Computer </ label> <input type = "checkbox" value = "1" "fav" name id = = = "fav" /> <label for "fav" /> Tourism </ label> <input type = "checkbox" value = "2" "fav" name id = = = "fav" /> <label for "fav" /> shopping </ label> <input type = "checkbox" value = " 3, "id =" fav "name =" fav " /> </ fieldset> <fieldset> <legend> Photos: </ legend> = <label for "myimage" /> personalized photo upload </ label> <input type = "file" id = "myimage" name = "myimage" size = "35" maxlength = "255" /> </ fieldset> <fieldset> <legend> submitted: </ legend> <input type = "submit" value = "submit" id = "submit" name = "submit" /> <input type "reset" value = = = "reset" name "reset" id = "reset" /> </ fieldset> </ form> 

Examples of HTML input labels

Note

  • Id attributes, marking an input label, this property included in the Common properties.