HTML INPUT TYPE ATTRIBUETS - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript HTML INPUT TYPE ATTRIBUETS - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Thursday, December 13, 2018

HTML INPUT TYPE ATTRIBUETS

INPUT TYPE ATTRIBUETS


type=" "

Specifies the field input type, including text, password,date time,checkbox,password submit etc.

name=" "

Describes the name of the form.

value=" "

escribes the value or input field information.

size=" "

specifies the input element width in characters.

maxlength=" "

Identifies the maximum input element character numbers allowed.

required

another helpfully explicit tag, making sure the <input> element is completely field out prior to the user submitting the form.

step=" "

Identifies the legal number intervals for an input field.

width=" "

Specifies the width (in pixel) of an <input> element.

height=" "

Dictates the height (again, in pixels) of an <input>element.

place holder=" "

provides a helpful hint to the user describing what the <input> element values should be.

pattern-=" " 

Identifies a regular expression that the <input> element  gets checked against making sure the user entered the correct information.

min=" "

The maximum value allowed for each <input> element.

max=" "

The maximum value allowed for each <input> element.

autofocous

Says to make sure that the <input> element comes into focous after the page loads.

disabled 

Disables an <input> element on the form.

<textarea> ... </textarea>

Specifies a large text input for longer messages.

<select> ... </select>

Describe a drop-down box for user's to select one form a variety of options.

SELECT ATTRIBUTES



name=" "

The name for a drop down combination box.

size=" "

Specifies the number of available , visible options in a drop-down.

multiple

allows for multiple selections to be made at one time.

required 

Requires that a value is selected before a user can submit a form.

autofocous

Specifies that a drop-down list automatically comes into focous after a page loads.

<optgroup> ... </optgroup>

specifies the entire grouping of available options.

<option> ... >/options>

Defines one of the available options in the drop down list.

OPTION ATTRIBUTES


value=" "

Explains the options value available for selection.

selected

Define the default selected option for users.

<button> ... </button>

Define the clickable button for users to submit options.


EXAMPLE


<form action="action_page.php" method="post">
<fieldset>
<legend>Personal information:</legend>
First name:<br>
<input type="text" name="firstname" value="mickey" placeholder="first name"><br>
Last name:<br>
<input type="text" name="lastname" value="mouse" placeholder=Last Name"><br><br>
Favorite car brand:<br>
<select>
<option value="volvo">volve</option>
<option value="saab">saab</option>
<option value="mercedes">mercedes</option>
<option value="audi">audi</option>
</select>
<text"area name="description"></textarea>
<input type="submit" value="submit">
</fieldset>
</form>

SAMPLE



No comments:

Post a Comment

Post Top Ad