HTML and CSS Reference
accept=" MIME type
MIME type "
Specifies a comma-separated list of content types that a server processing the form will
handle correctly. It can be used to filter out nonconforming files when prompting a user to
select files to send to the server. Applies to the file input type only.
Specifies alternative text for an image used as a button. Applies to the image input type.
Not in HTML 4.01 . Allows the user agent (browser) to fill in a field automatically ( on ) or
requires the user to enter the information every time ( off ). Omitting this attribute causes
thecontroltoinheritthe autocomplete settingfortheassociated form element.Appliesto
input types text , password , email , tel , search , url , number , range , date , time , dat-
etime , datetime-local , month , week , and color .
autofocus ( autofocus="autofocus" in XHTML)
Not in HTML 4.01 . Indicates the control should have focus (be highlighted and ready for
user input) when the document loads. Applies to all input types.
checked ( checked="checked" in XHTML)
When this attribute is added to a radio button or checkbox input, the input will be checked
when the page loads. Applies to the checkbox and radio input types.
dirname=" text string
text string "
Not in HTML 4.01 . Enables the submission of the directionality of the element ( ltr or
rtl ) by providing the name of the field that contains the value. This could enable a form
to have a user-selected direction setting for form entries. Applies to the text and search