HTML and CSS Reference
In-Depth Information
Table 3-8. HTML5 Attributes
Attribute
Element(s)
Description
Value
abbr
th
Alternative label for header cell
(reference in different context)
Text
accept
input
Hint for expected file type in file
upload controls
Set of comma-separated
tokens
accept-charset
form
Character encodings (form
submission)
Ordered set of unique space-
separated tokens (ASCII
case-insensitive)
accesskey
HTML elements
Keyboard shortcut to activate or
focus element
Ordered set of unique
space-separated tokens
(case-sensitive; one Unicode
codepoint)
action
form
URL (form submission)
URL
alt
area , img , input
Alternate text for images or input
fields
Text
async
script
Execute script asynchronously
Boolean attribute
autocomplete
form
on | off
Prevent autocompletion for form
control(s)
autocomplete
input , select , textarea
Hint for form autofill
Autofill field name and
related tokens
autofocus
button , input , keygen ,
select , textarea
Gives focus to form control
automatically when the page is
loaded
Boolean attribute
autoplay
audio , video
Media playback starts
automatically
Boolean attribute
border
table
Indication that the table element
is used for tabular data, not layout
Empty string or 1
challenge
keygen
String to package with the
generated and signed public key
Text
charset
meta
Character encoding declaration
Preferred MIME name of an
encoding
charset
script
Character encoding of external
script file
Preferred MIME name of an
encoding
checked
input
Determines whether the control is
checked
Boolean attribute
cite
blockquote , del , ins , q
Link to quotation source or
additional information
URL
class
HTML elements
Element class
Set of space-separated tokens
( continued )
Search WWH ::




Custom Search