bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/HTML/Reference and Practice
HTML•Reference and Practice

HTML Attribute Reference

Concept visual

HTML Attribute Reference

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Overview

The table below lists all HTML attributes and what elements they can be used within:

Attribute

Belongs to

Description accept

<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

Global Attributes

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 align

Not 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 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 charset <meta>, <script>

Specifies the character encoding checked

<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 class

Global Attributes

Specifies 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 contenteditable

Global Attributes

Specifies 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>

Specifies the coordinates of the area data

<object> Specifies the URL of the resource to be used by the object data-*

Global Attributes

Used to store custom data private to the page or application datetime <del>, <ins>, <time>

Specifies the date and time default

<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

Global Attributes

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

Global Attributes

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

Global Attributes

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 the height of the element hidden

Global Attributes

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 id

Global Attributes

Specifies a unique id for an element inert

Global Attributes

Specifies that the browser should ignore this section inputmode

Global Attributes

Specifies the mode of a virtual keyboard ismap <img>

Formula

Specifies an image as a server - side image map kind

<track>

Specifies the kind of text track label

<track>, <option>, <optgroup> Specifies the title of the text track lang

Global Attributes

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>

Specifies the maximum value maxlength

<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>

Specifies a minimum value multiple

<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>

Specifies the name of the element novalidate

<form> Specifies that the form should not be validated when submitted onabort <audio>, <embed>, <img>, <object>, <video>

Previous

HTML Online Editor

Next

HTML Quiz