HTML CSS Bootstrap Javascript Icons Python
HTML References
HTML - Tag Reference HTML - Tag by Category HTML - Attributes HTML - Global Attributes HTML - Events HTML - Language Codes HTML - Country Codes HTML - URL Encoding HTTP Methods HTTP Status Codes <input> types
All HTML Tags
<!-- --> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <h1> - <h6> <head> <header> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <label> <legend> <li> <link> <main> <map> <mark> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <picture> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <svg> <table> <tbody> <td> <template> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr>

HTML Attribute Reference

Elements in HTML have attributes; these are additional values that configure the elements or adjust their behavior in various ways to meet the criteria the users want.

Attribute Elements Description
accept <input> Specifies the types of files that the server accepts (only for type="file")
accept-charset <form> Specifies the character encodings that are to be used for the form submission
accesskey Global Attributes Defines a keyboard shortcut to activate or add focus to the element
action <form> Specifies where to send the form-data when a form is submitted
align Not supported in HTML 5 Specifies the horizontal alignment of the element. Use CSS alignment instead
alt <area>, <img>, <input> Specifies an alternative text in case an image can't be displayed
async <script> Indicates that the script should be executed asynchronously (only for external scripts)
autocomplete <form>, <input> Indicates whether controls in this form can by default have their values automatically completed by the browser
autofocus <button>, <input>, <select>, <textarea> The element should be automatically focused after the page loaded
autoplay <audio>, <video> The audio or video should play as soon as possible
bgcolor Not supported in HTML 5 Specifies the background color of an element. Use CSS background-color property instead
border Not supported in HTML 5 Specifies the width of the border of an element. Use CSS border property instead
charset <meta>, <script> Declares the character encoding of the page or script
checked <input> Specifies that an <input> element should be pre-selected when the page loads (for type="checkbox" or type="radio")
cite <blockquote>, <del>, <ins>, <q> Contains a URL which points to the source of the quote or change
class Global Attributes Often used with CSS to style elements with common properties
color Not supported in HTML 5 Specifies the text color of an element. Use CSS color property instead
cols <textarea> Defines the number of columns in a textarea
colspan <td>, <th> Defines the number of columns a table cell should span
content <meta> A value associated with http-equiv or name depending on the context
contenteditable Global Attributes Indicates whether the element's content is editable
controls <audio>, <video> Indicates whether the browser should show playback controls to the user
coords <area> Specifies the coordinates of the area (image-map)
data <object> Specifies the URL of the resource to be used by the object
data-* Global Attributes Used to store custom data associated with the element
datetime <del>, <ins>, <time> Indicates the date and time associated with the element
default <track> Indicates that the track should be enabled unless the user's preferences indicate something different
defer <script> Indicates that the script should be executed after the page has been parsed
dir Global Attributes Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
dirname <input>, <textarea> Specifies that the text direction will be submitted
disabled <button>, <fieldset>, <input>, <optgroup>, <option>, <select>, <textarea> Indicates whether the user can interact with the element
download <a>, <area> Indicates that the hyperlink is to be used for downloading a resource
draggable Global Attributes Defines whether the element can be dragged
dropzone Global Attributes Indicates that the element accept the dropping of content on it
enctype <form> Defines the content type of the form date when the method is POST
for <label>, <output> Describes elements which belongs to this one
form <button>, <fieldset>, <input>, <label>, <meter>, <object>, <output>, <select>, <textarea> Indicates the form that is the owner of the element
formaction <button>, <input> Specifies where to send the form-data when a form is submitted (only for type="submit")
headers <td>, <th> Specifies one or more headers cells a cell is related to
height <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video> Defines the height of the element
hidden Global Attributes Specifies that an element is not yet, or is no longer, relevant
high <meter> Indicates the lower bound of the upper range
href <a>, <area>, <base>, <link> Specifies the URL of a linked resource
hreflang <a>, <area>, <link> Specifies the language of the linked resource
http-equiv <meta> Defines a pragma directive
id Global Attributes Specifies a unique id for an element
ismap <img> Indicates that the image is part of a server-side image map
kind <track> Specifies the kind of text track
label <track>, <optgroup> Specifies a user-readable label for element
lang Global Attributes Defines the language used in the element
list <input> Identifies a list of pre-defined options to suggest to the user
loop <audio>, <video> Indicates whether the media should start playing from the start when it's finished
low <meter> Indicates the upper bound of the lower range
max <input>, <meter>, <progress> Indicates the maximum value allowed
maxlength <input>, <textarea> Defines the maximum number of characters allowed in the element
media <a>, <area>, <link>, <source>, <style> Specifies a hint of the media for which the linked resource was designed
method <form> Defines which HTTP method to use when submitting the form. Can be GET (default) or POST
min <input>, <meter> Indicates the minimum value allowed
minlength <input>, <textarea> Defines the minimum number of characters allowed in the element
multiple <input>, <select> Indicates whether multiple values can be entered in an input of the type email or file
muted <video>, <audio> Indicates whether the audio will be initially silenced on page load
name <button>, <fieldset>, <form>, <iframe>, <input>, <map>, <meta>, <object>, <output>, <param>, <select>, <textarea> Specifies the name of the element. For example used by the server to identify the fields in form submits
novalidate <form> Indicates that the form shouldn't be validated when submitted
open <details>, <dialog> Specifies that the details/dialog should be visible on page load
optimum <meter> Indicates the optimal numeric value
pattern <input> Defines a regular expression which the <input> element's value will be validated against
placeholder <input>, <textarea> Provides a hint to the user of what can be entered in the field
poster <video> Specifies an image to be shown until the user hits the play button
preload <audio>, <video> Indicates whether the whole resource, parts of it or nothing should be preloaded
readonly <input>, <textarea> Specifies whether the element can be edited
rel <a>, <area>, <link> Specifies the relationship between the current document and the linked document
required <input>, <select>, <textarea> Indicates whether this element is required to fill out or not
reversed <ol> Indicates whether the list should be displayed in a descending order instead of a ascending
rows <textarea> Specifies the number of rows in a textarea
rowspan <td>, <th> Defines the number of rows a table cell should span over
sandbox <iframe> Stops a document loaded in an iframe from using certain features (such as submitting forms or opening new windows)
scope <th> Defines the cells that the header test
selected <option> Defines that an option should be pre-selected when the page loads
shape <area> Defines the shape of the image map
size <input>, <select> Defines the width of the element (in pixels). If the element's type attribute is text or password then it's the number of characters
sizes <img>, <link>, <source> Specifies the size of the linked resource
span <col>, <colgroup> Specifies the number of columns to span
spellcheck Global Attributes Indicates whether spell checking is allowed for the element
src <audio>, <embed>, <iframe>, <img>, <input>, <script>, <source>, <track>, <video> Specifies the URL of the embeddable content
srcdoc <iframe> Defines the HTML content of the page to show in the <iframe>
srclang <track> Defines the language-code of the track text data
srcset <img>, <source> Defines the URL of the image to use in different situations
start <ol> Defines the start value of an ordered list if other than 1
step <input> Defines the legal number intervals for an input field
style Global Attributes Defines an inline CSS style for an element
tabindex Global Attributes Overrides the browser's default tab order and follows the one specified instead
target <a>, <area>, <base>, <form> Specifies the target for where to open the linked document or where to submit the form
title Global Attributes Text to be displayed in a tooltip when hovering over the element
translate Global Attributes Specifies whether the content of an element should be translated or not
type <button>, <embed>, <input>, <link>, <menu>, <object>, <ol>, <script>, <source>, <style> Defines the type of element
usemap <img>, <object> Defines an image as a client-side image-map
value <button>, <input>, <li>, <option>, <meter>, <param>, <progress> Defines a default value which will be displayed in the element on page load
width <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video> Defines the width of the element
wrap <textarea> Indicates whether the text should be wrapped

Last updated: Sunday 26 Aug, 2018