Google News
logo
HTML Attributes
Attribute Belongs to Description
align Not supported in HTML 5. Specifies the alignment according to surrounding elements. Use CSS instead
title Global Attributes Specifies extra information about an element
style Global Attributes Specifies an inline CSS style for an element
id Global Attributes Specifies a unique id for an element
dir Global Attributes Specifies the text direction for the content in an element
lang Global Attributes Specifies the language of the element's content
alt <area>, <img>, <input> Specifies an alternate text when the original element fails to display
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
class Global Attributes 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
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> Gives the value associated with the http-equiv or name attribute
datetime <del>, <ins>, <time> Specifies the date and time
form <button>, <fieldset>, <input>, <keygen>, <label>, <meter>, <object>, <output>, <select>, <textarea> Specifies the name of the form the element belongs to
href <a>, <area>, <base>, <link> Specifies the URL of the page the link goes to
label <track>, <option>, <optgroup> Specifies the title of the text track
list <input> Refers to a <datalist> element that contains pre-defined options for an <input> element
onchange All visible elements. Script to be run when the value of the element is changed
onclick All visible elements. Script to be run when the element is being clicked
placeholder <input>, <textarea> Specifies a short hint that describes the expected value of the element
required <input>, <select>, <textarea> Specifies that the element must be filled out before submitting the form
span <col>, <colgroup> Specifies the number of columns to span
src <audio>, <embed>, <iframe>, <img>, <input>, <script>, <source>, <track>, <video> Specifies the URL of the media file
width <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video> Specifies the width of the element