HTML - Input Element

> (World Wide) Web - (W3|WWW) > HyperText markup Language (HTML)

1 - About

Advertising

3 - Attributes

  • type
  • required
  • size=“10” input value length
  • pattern=“[a-z]{4,8}” pattern

4 - Type

4.1 - Text

input/text: a basic text input

<!-- Label is coupled to input via the for attributes that define the input id -->
<label for="textId">Choose a username: </label> 
<input id="textId"  name="textName" type="text"  placeholder="text input" />

input/search. Identical to text inputs, but may be styled differently by the user agent.

<label for="searchId">Search: </label> 
<input id="searchId"  name="searchName" type="search"  placeholder="search term" />

4.3 - Email

input/email

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

Advertising

4.4 - Button

input/button

<input type="button"  value="Click Me" />

4.5 - Number

input/number

<input type="number"  placeholder="0" />

4.6 - Color

input/color

<input type="color"  placeholder="red" />

4.7 - Checkbox

input/checkbox

<input type="checkbox"  placeholder="checkbox input" />

Advertising

4.8 - Radio

input/radio

<input type="radio"  placeholder="radio input" />

4.9 - Date

input/date

<input type="date"  placeholder="date input" />

4.10 - Datetime-local

input/datetime-local datetime-local: HTML5 A control for entering a date and time, with no time zone.

<input type="datetime-local"  placeholder="date input" />

4.11 - File

input/file

<input type="file"  placeholder="file input" />

4.12 - Image

input/image: A graphical submit button.

<input 
    type="image" 
    src="https://gerardnico.com/wiki/_media/resume/nico.jpg" 
    alt="nico submit button" 
    height=50 
    width=50 
    />

4.13 - Month

input/month

<input type="month"  placeholder="month input" />

4.14 - Password

input/password

<input type="password"  placeholder="password input" />

4.15 - Range

input/range

<input type="range"  placeholder="range input" />

4.16 - Time

input/time

<input type="time"  placeholder="time input" />

4.17 - Tel

input/tel. One of the main advantages of is that it causes mobile browsers to display a special keyboard for entering phone numbers.

<input type="tel"  placeholder="+31600000" />

4.18 - Submit

input/submit.

<input type="submit"  value="Send Request" accesskey="s" />

5 - Documentation / Reference

web/html/input.txt · Last modified: 2019/02/09 11:29 by gerardnico