Loading lesson path
Concept visual
Start at both ends
Overview
The table below lists all HTML attributes and what elements they can be used within:
<input> Specifies the types of files that the server accepts (only for type="file")
Formula
accept - charset<form> Specifies the character encodings that are to be used for the form submission accesskey
Formula
Specifies a shortcut key to activate/focus an element action<form>
Formula
Specifies where to send the form - data when a form is submitted alignNot supported in HTML 5. Specifies the alignment according to surrounding elements. Use CSS instead alt <area>, <img>, <input> Specifies an alternate text when the original element fails to display async <script> Specifies that the script is executed asynchronously (only for external scripts) autocomplete <form>, <input>
Formula
Specifies whether the < form > or the < input > element should have autocomplete enabled autofocus<button>, <input>, <select>, <textarea> Specifies that the element should automatically get focus when the page loads autoplay <audio>, <video>
Formula
Specifies that the audio/video will start playing as soon as it is ready bgcolorNot 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 charset <meta>, <script>
<input>
Formula
Specifies that an < input > element should be pre - selected when the page loads(for type="checkbox" or type="radio") cite <blockquote>, <del>, <ins>, <q>
Formula
Specifies a URL which explains the quote/deleted/inserted text classSpecifies one or more class names 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 cols <textarea> Specifies the visible width of a text area colspan <td>, <th> Specifies the number of columns a table cell should span content <meta>
Formula
Gives the value associated with the http - equiv or name attribute contenteditableSpecifies whether the content of an element is editable or not controls <audio>, <video>
Formula
Specifies that audio/video controls should be displayed (such as a play/pause button etc.)coords <area>
<object> 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 <del>, <ins>, <time>
<track> Specifies that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate defer <script> 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 <input>, <textarea> Specifies that the text direction will be submitted disabled <button>, <fieldset>, <input>, <optgroup>, <option>, <select>, <textarea>
Formula
Specifies that the specified element/group of elements should be disabled download<a>, <area> Specifies that the target will be downloaded when a user clicks on the hyperlink draggable
Specifies whether an element is draggable or not enctype <form>
Formula
Specifies how the form - data should be encoded when submitting it to the server (only for method ="post")enterkeyhint
Formula
Specifies the text of the enter - key on a virtual keyboard for<label>, <output>
Formula
Specifies which form element(s) a label/calculation is bound to form<button>, <fieldset>, <input>, <label>, <meter>, <object>, <output>, <select>, <textarea> Specifies the name of the form the element belongs to formaction <button>, <input>
Formula
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>
Specifies that an element is not yet, or is no longer, relevant high <meter> Specifies the range that is considered to be a high value href <a>, <area>, <base>, <link> Specifies the URL of the page the link goes to hreflang <a>, <area>, <link>
Formula
Specifies the language of the linked document http - equiv<meta>
Formula
Provides an HTTP header for the information/value of the content attribute idSpecifies a unique id for an element inert
Specifies that the browser should ignore this section inputmode
Specifies the mode of a virtual keyboard ismap <img>
Formula
Specifies an image as a server - side image map kind<track>
<track>, <option>, <optgroup> Specifies the title of the text track lang
Specifies the language of the element's content list <input>
Formula
Refers to a < datalist > element that contains pre - defined options for an < input >element loop <audio>, <video>
Formula
Specifies that the audio/video will start over again, every time it is finished low<meter> Specifies the range that is considered to be a low value max <input>, <meter>, <progress>
<input>, <textarea> Specifies the maximum number of characters allowed in an element media <a>, <area>, <link>, <source>, <style>
Formula
Specifies what media/device the linked document is optimized for method<form>
Formula
Specifies the HTTP method to use when sending form - data min<input>, <meter>
<input>, <select> Specifies that a user can enter more than one value muted <video>, <audio> Specifies that the audio output of the video should be muted name <button>, <fieldset>, <form>, <iframe>, <input>, <map>, <meta>, <object>, <output>, <param>, <select>, <textarea>
<form> Specifies that the form should not be validated when submitted onabort <audio>, <embed>, <img>, <object>, <video>