HTML and CSS Reference
In-Depth Information
width This attribute, initially supported by many browsers such as Internet Explorer for
image buttons and now defined under HTML5, is used to set the size of the form control, in
pixels. This should be controlled with CSS instead.
Examples
<form action="#" method="get">
<fieldset>
<legend> Basics </legend>
<p> Enter your name: <input type="text" maxlength="35" size="20"><br>
Enter your password: <input type="password" maxlength="35" size="20">
</p>
</fieldset>
<p><label> Which is your favorite food? </label>
<input type="radio" name="favorite" value="Mexican"> Mexican
<input type="radio" name="favorite" value="Russian"> Russian
<input type="radio" name="favorite" value="Japanese"> Japanese
<input type="radio" checked name="favorite" value="Other"> Other
</p>
<p>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</p>
</form>
<!-- HTML5 snippets -->
<p><label> Three Letter Acronyms:
<input pattern="[A-Z]{3}" name="threeletter"
title="Enter an upper case three letter combination."/>
</label></p>
<p><label> Name: <input type="text" name="fullname" placeholder="Thomas A.
Powell"></label></p>
<p><input type="range" name="slider"></p>
<p><input type = "date" oninput = "year.value = valueAsDate.getYear();">
<p> HTML5 finalized in the year <output output = "year"> &nbsp; </output></p>
<p><label> Favorite Dog: <input list="dogs"></label></p>
<datalist id = "dogs">
<option> Angus </option>
<option> Tucker </option>
<option> Cisco </option>
<option> Sabrina </option>
</datalist>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Search WWH ::




Custom Search