Learn HTML from beginning to end
All HTML Attributes
Attribute
|
Belongs
to
|
Description
|
Specifies
the types of files that the server accepts (only for type="file")
|
||
Specifies
the character encodings that are to be used for the form submission
|
||
Specifies
a shortcut key to activate/focus an element
|
||
Specifies
where to send the form-data when a form is submitted
|
||
align
|
Not supported in HTML 5.
|
Specifies
the alignment according to surrounding elements. Use CSS instead
|
Specifies
an alternate text when the original element fails to display
|
||
Specifies
that the script is executed asynchronously (only for external scripts)
|
||
Specifies
whether the <form> or the <input> element should have
autocomplete enabled
|
||
Specifies
that the element should automatically get focus when the page loads
|
||
Specifies
that the audio/video will start playing as soon as it is ready
|
||
bgcolor
|
Not supported in HTML 5.
|
Specifies
the background color of an element. Use CSS instead
|
border
|
Not supported in HTML 5.
|
Specifies
the width of the border of an element. Use CSS instead
|
Specifies
the character encoding
|
||
Specifies
that an <input> element should be pre-selected when the page loads (for
type="checkbox" or type="radio")
|
||
Specifies
a URL which explains the quote/deleted/inserted text
|
||
Specifies
one or more classnames for an element (refers to a class in a style sheet)
|
||
color
|
Not supported in HTML 5.
|
Specifies
the text color of an element. Use CSS instead
|
Specifies
the visible width of a text area
|
||
Specifies
the number of columns a table cell should span
|
||
Gives
the value associated with the http-equiv or name attribute
|
||
Specifies
whether the content of an element is editable or not
|
||
Specifies
a context menu for an element. The context menu appears when a user
right-clicks on the element
|
||
Specifies
that audio/video controls should be displayed (such as a play/pause button
etc)
|
||
Specifies
the coordinates of the area
|
||
Specifies
the URL of the resource to be used by the object
|
||
Used
to store custom data private to the page or application
|
||
Specifies
the date and time
|
||
Specifies
that the track is to be enabled if the user's preferences do not indicate
that another track would be more appropriate
|
||
Specifies
that the script is executed when the page has finished parsing (only for
external scripts)
|
||
Specifies
the text direction for the content in an element
|
||
Specifies
that the text direction will be submitted
|
||
Specifies
that the specified element/group of elements should be disabled
|
||
Specifies
that the target will be downloaded when a user clicks on the hyperlink
|
||
Specifies
whether an element is draggable or not
|
||
Specifies
whether the dragged data is copied, moved, or linked, when dropped
|
||
Specifies
how the form-data should be encoded when submitting it to the server (only
for method="post")
|
||
Specifies
which form element(s) a label/calculation is bound to
|
||
Specifies
the name of the form the element belongs to
|
||
Specifies
where to send the form-data when a form is submitted. Only for
type="submit"
|
||
Specifies
one or more headers cells a cell is related to
|
||
Specifies
the height of the element
|
||
Specifies
that an element is not yet, or is no longer, relevant
|
||
Specifies
the range that is considered to be a high value
|
||
Specifies
the URL of the page the link goes to
|
||
Specifies
the language of the linked document
|
||
Provides
an HTTP header for the information/value of the content attribute
|
||
Specifies
a unique id for an element
|
||
Specifies
an image as a server-side image-map
|
||
Specifies
the kind of text track
|
||
Specifies
the title of the text track
|
||
Specifies
the language of the element's content
|
||
Refers
to a <datalist> element that contains pre-defined options for an
<input> element
|
||
Specifies
that the audio/video will start over again, every time it is finished
|
||
Specifies
the range that is considered to be a low value
|
||
Specifies
the maximum value
|
||
Specifies
the maximum number of characters allowed in an element
|
||
Specifies
what media/device the linked document is optimized for
|
||
Specifies
the HTTP method to use when sending form-data
|
||
Specifies
a minimum value
|
||
Specifies
that a user can enter more than one value
|
||
Specifies
that the audio output of the video should be muted
|
||
Specifies
the name of the element
|
||
Specifies
that the form should not be validated when submitted
|
||
Script
to be run on abort
|
||
Script
to be run after the document is printed
|
||
Script
to be run before the document is printed
|
||
Script
to be run when the document is about to be unloaded
|
||
All
visible elements.
|
Script
to be run when the element loses focus
|
|
Script
to be run when a file is ready to start playing (when it has buffered enough
to begin)
|
||
Script
to be run when a file can be played all the way to the end without pausing
for buffering
|
||
All
visible elements.
|
Script
to be run when the value of the element is changed
|
|
All
visible elements.
|
Script
to be run when the element is being clicked
|
|
All
visible elements.
|
Script
to be run when a context menu is triggered
|
|
All
visible elements.
|
Script
to be run when the content of the element is being copied
|
|
All
visible elements.
|
Script
to be run when the content of the element is being cut
|
|
All
visible elements.
|
Script
to be run when the element is being double-clicked
|
|
All
visible elements.
|
Script
to be run when the element is being dragged
|
|
All
visible elements.
|
Script
to be run at the end of a drag operation
|
|
All
visible elements.
|
Script
to be run when an element has been dragged to a valid drop target
|
|
All
visible elements.
|
Script
to be run when an element leaves a valid drop target
|
|
All
visible elements.
|
Script
to be run when an element is being dragged over a valid drop target
|
|
All
visible elements.
|
Script
to be run at the start of a drag operation
|
|
All
visible elements.
|
Script
to be run when dragged element is being dropped
|
|
Script
to be run when the length of the media changes
|
||
Script
to be run when something bad happens and the file is suddenly unavailable
(like unexpectedly disconnects)
|
||
Script
to be run when the media has reach the end (a useful event for messages like
"thanks for listening")
|
||
Script
to be run when an error occurs
|
||
All
visible elements.
|
Script
to be run when the element gets focus
|
|
Script
to be run when there has been changes to the anchor part of the a URL
|
||
All
visible elements.
|
Script
to be run when the element gets user input
|
|
All
visible elements.
|
Script
to be run when the element is invalid
|
|
All
visible elements.
|
Script
to be run when a user is pressing a key
|
|
All
visible elements.
|
Script
to be run when a user presses a key
|
|
All
visible elements.
|
Script
to be run when a user releases a key
|
|
Script
to be run when the element is finished loading
|
||
Script
to be run when media data is loaded
|
||
Script
to be run when meta data (like dimensions and duration) are loaded
|
||
Script
to be run just as the file begins to load before anything is actually loaded
|
||
All
visible elements.
|
Script
to be run when a mouse button is pressed down on an element
|
|
All
visible elements.
|
Script
to be run as long as the mouse pointer is moving over an element
|
|
All
visible elements.
|
Script
to be run when a mouse pointer moves out of an element
|
|
All
visible elements.
|
Script
to be run when a mouse pointer moves over an element
|
|
All
visible elements.
|
Script
to be run when a mouse button is released over an element
|
|
All
visible elements.
|
Script
to be run when a mouse wheel is being scrolled over an element
|
|
Script
to be run when the browser starts to work offline
|
||
Script
to be run when the browser starts to work online
|
||
onpagehide
|
Script
to be run when a user navigates away from a page
|
|
Script
to be run when a user navigates to a page
|
||
All
visible elements.
|
Script
to be run when the user pastes some content in an element
|
|
Script
to be run when the media is paused either by the user or programmatically
|
||
Script
to be run when the media is ready to start playing
|
||
Script
to be run when the media actually has started playing.
|
||
onpopstate
|
Script
to be run when the window's history changes.
|
|
Script
to be run when the browser is in the process of getting the media data
|
||
Script
to be run each time the playback rate changes (like when a user switches to a
slow motion or fast forward mode).
|
||
Script
to be run when a reset button in a form is clicked.
|
||
Script
to be run when the browser window is being resized.
|
||
All
visible elements.
|
Script
to be run when an element's scrollbar is being scrolled
|
|
Script
to be run when the user writes something in a search field (for
<input="search">)
|
||
Script
to be run when the seeking attribute is set to false indicating that seeking
has ended
|
||
Script
to be run when the seeking attribute is set to true indicating that seeking
is active
|
||
All
visible elements.
|
Script
to be run when the element gets selected
|
|
Script
to be run when a <menu> element is shown as a context menu
|
||
Script
to be run when the browser is unable to fetch the media data for whatever
reason
|
||
onstorage
|
Script
to be run when a Web Storage area is updated
|
|
Script
to be run when a form is submitted
|
||
Script
to be run when fetching the media data is stopped before it is completely
loaded for whatever reason
|
||
Script
to be run when the playing position has changed (like when the user fast
forwards to a different point in the media)
|
||
Script
to be run when the user opens or closes the <details> element
|
||
Script
to be run when a page has unloaded (or the browser window has been closed)
|
||
Script
to be run each time the volume of a video/audio has been changed
|
||
Script
to be run when the media has paused but is expected to resume (like when the
media pauses to buffer more data)
|
||
All
visible elements.
|
Script
to be run when the mouse wheel rolls up or down over an element
|
|
Specifies
that the details should be visible (open) to the user
|
||
Specifies
what value is the optimal value for the gauge
|
||
Specifies
a regular expression that an <input> element's value is checked against
|
||
Specifies
a short hint that describes the expected value of the element
|
||
Specifies
an image to be shown while the video is downloading, or until the user hits
the play button
|
||
Specifies
if and how the author thinks the audio/video should be loaded when the page
loads
|
||
Specifies
that the element is read-only
|
||
Specifies
the relationship between the current document and the linked document
|
||
Specifies
that the element must be filled out before submitting the form
|
||
Specifies
that the list order should be descending (9,8,7...)
|
||
Specifies
the visible number of lines in a text area
|
||
Specifies
the number of rows a table cell should span
|
||
Enables
an extra set of restrictions for the content in an <iframe>
|
||
Specifies
whether a header cell is a header for a column, row, or group of columns or
rows
|
||
Specifies
that the styles only apply to this element's parent element and that
element's child elements
|
||
Specifies
that an option should be pre-selected when the page loads
|
||
Specifies
the shape of the area
|
||
Specifies
the width, in characters (for <input>) or specifies the number of
visible options (for <select>)
|
||
Specifies
the size of the linked resource
|
||
Specifies
the number of columns to span
|
||
Specifies
whether the element is to have its spelling and grammar checked or not
|
||
Specifies
the URL of the media file
|
||
Specifies
the HTML content of the page to show in the <iframe>
|
||
Specifies
the language of the track text data (required if kind="subtitles")
|
||
Specifies
the URL of the image to use in different situations
|
||
Specifies
the start value of an ordered list
|
||
Specifies
the legal number intervals for an input field
|
||
Specifies
an inline CSS style for an element
|
||
Specifies
the tabbing order of an element
|
||
Specifies
the target for where to open the linked document or where to submit the form
|
||
Specifies
extra information about an element
|
||
Specifies
whether the content of an element should be translated or not
|
||
Specifies
the type of element
|
||
Specifies
an image as a client-side image-map
|
||
Specifies
the value of the element
|
||
Specifies
the width of the element
|
||
Comments
Post a Comment