html attributes Flashcards
accept
Specifies the types of files that the server accepts (only for type=”file”)
accept-charset
Specifies the character encodings that are to be used for the form submission
accesskey
Specifies a shortcut key to activate/focus an element
action
Specifies where to send the form-data when a form is submitted
alt
Specifies an alternate text when the original element fails to display
async
Specifies that the script is executed asynchronously (only for external scripts)
autocomplete
Specifies whether the or the element should have autocomplete enabled
autofocus
Specifies that the element should automatically get focus when the page loads
autoplay
Specifies that the audio/video will start playing as soon as it is ready
charset
Specifies the character encoding
checked
Specifies that an element should be pre-selected when the page loads (for type=”checkbox” or type=”radio”)
cite
Specifies a URL which explains the quote/deleted/inserted text
class
Specifies one or more classnames for an element (refers to a class in a style sheet)
color
Specifies the text color of an element. Use CSS instead
cols
Specifies the visible width of a text area
colspan
Specifies the number of columns a table cell should span
content
Gives the value associated with the http-equiv or name attribute
contenteditable
Specifies whether the content of an element is editable or not
controls
Specifies that audio/video controls should be displayed (such as a play/pause button etc)
coords
Specifies the coordinates of the area
data
Specifies the URL of the resource to be used by the object
data-*
Used to store custom data private to the page or application
datetime
Specifies the date and time
default
Specifies that the track is to be enabled if the user’s preferences do not indicate that another track would be more appropriate
defer
Specifies that the script is executed when the page has finished parsing (only for external scripts)
dir
Specifies the text direction for the content in an element
dirname
Specifies that the text direction will be submitted
disabled
Specifies that the specified element/group of elements should be disabled
download
Specifies that the target will be downloaded when a user clicks on the hyperlink
draggable
Specifies whether an element is draggable or not
dropzone
Specifies whether the dragged data is copied, moved, or linked, when dropped
enctype
Specifies how the form-data should be encoded when submitting it to the server (only for method=”post”)
for
Specifies which form element(s) a label/calculation is bound to
form
Specifies the name of the form the element belongs to
formaction
Specifies where to send the form-data when a form is submitted. Only for type=”submit”
headers
Specifies one or more headers cells a cell is related to
height
Specifies the height of the element
hidden
Specifies that an element is not yet, or is no longer, relevant
high
Specifies the range that is considered to be a high value
href
Specifies the URL of the page the link goes to
hreflang
Specifies the language of the linked document
http-equiv
Provides an HTTP header for the information/value of the content attribute
id
Specifies a unique id for an element
ismap
Specifies an image as a server-side image-map
kind
Specifies the kind of text track
label
Specifies the title of the text track
lang
Specifies the language of the element’s content
list
Refers to a element that contains pre-defined options for an element
loop
Specifies that the audio/video will start over again, every time it is finished
low
Specifies the range that is considered to be a low value
max
Specifies the maximum value
maxlength
Specifies the maximum number of characters allowed in an element
media
Specifies what media/device the linked document is optimized for
method
Specifies the HTTP method to use when sending form-data
min
Specifies a minimum value
multiple
Specifies that a user can enter more than one value
muted
Specifies that the audio output of the video should be muted
name
Specifies the name of the element
novalidate
Specifies that the form should not be validated when submitted
onabort
Script to be run on abort
onafterprint
Script to be run after the document is printed
onbeforeprint
Script to be run before the document is printed
onbeforeunload
Script to be run when the document is about to be unloaded
onblur
Script to be run when the element loses focus
oncanplay
Script to be run when a file is ready to start playing (when it has buffered enough to begin)
oncanplaythrough
Script to be run when a file can be played all the way to the end without pausing for buffering