You are here: Reference > HTML > attributes

HTML Attributes

Attribute name Support Description
abbr (td, th)
Sets an abbreviation for a table header or table cell data.
accept (form, input:file)
Sets a comma-separated list of accepted content types.
accept-charset (form)
Sets a list of character encodings for a form.
accessKey
Sets an access key to an element.
action (form)
Sets a form processing agent. With this attribute you can set an URL to call when the form is sent.
align (embed, img, object, ...)
Sets the object's position with respect to the surrounding text.
align (caption, legend)
Sets the alignment of a caption and legend element relative to a table or fieldSet element.
align (div, Hn, p, td, tr, ...)
Sets the horizontal alignment of the contents in an object.
align (hr, iframe, marquee, table)
Sets the horizontal alignment of an object relative to its parent.
aLink (body)
Sets the color of the active hypertext links in the entire document.
ALLOWTRANSPARENCY (frame, iframe)
9
Sets whether a frame element (frame or iframe) can be transparent.
alt (area, img, object, ...)
Sets an alternate text that is displayed when the file associated with the element cannot be displayed.
archive (applet, object)
Sets a space-separated list of URLs for archive files.
autoComplete (form, input)
Sets whether the text field should give the user some suggestion during typing.
autosave (input:search)
Specifies the name of a category in the search history.
axis (td, th)
Sets a comma-separated list of category names.
background (body)
Sets the background picture, which will be tiled to provide the body background.
background (table, td, th)
Sets the background picture, which will be tiled if it is smaller than the object's dimensions.
balance (bgsound)
Specifies how the volume will be divided between the left and right speakers.
behavior (marquee)
Sets the movement of text across the marquee element.
bgColor (body, table, td, ...)
Sets the background color.
bgColor (col, colgroup)
Sets the background color of one or more specified columns in a table element.
bgProperties (body)
Sets whether the background picture, specified by the background attribute, is fixed or scrollable.
border (frameset)
Specifies the width of the border between frames.
border (img, object, table, ...)
Sets the thickness of the border.
borderColor (frame, frameset, table, ...)
Sets the color of the border.
borderColorDark (table, td, th, tr)
Sets or retrieves the color used to draw the right and bottom borders of a table.
borderColorLight (table, td, th, tr)
Sets or retrieves the color used to draw the left and top borders of a table.
bottomMargin (body)
Specifies the thickness of the bottom margin in the document body.
cellPadding (table)
Specifies the amount of space between the border of a cell and its contents in a table.
cellSpacing (table)
Sets the amount of space between the border of the cells in a table.
ch (col, tbody, td, tr, ...)
Sets an alignment character. The alignment of the contents of the cells in the same column depends on this character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
challenge (keygen)
Sets a challenge string for verification of an encrypted package.
char (col, tbody, td, tr, ...)
Sets an alignment character. The alignment of the contents of the cells in the same column depends on this character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
charOff (col, tbody, td, tr, ...)
Sets the horizontal offset of the ch and char attributes. The direction of the offset is the same as the direction of the text (dir attribute).
charset (a, link, meta, script)
Sets the character encoding of the document, a linked document or a script block.
CHECKED (input(checkbox, radio))
Specifies the initial state of a check box or a radio button.
chOff (col, tbody, td, tr, ...)
Sets the horizontal offset of the ch and char attributes. The direction of the offset is the same as the direction of the text (dir attribute).
cite
Sets the location of the source document.
class
Sets the style class or classes that belong to the element.
classid (applet, object)
Sets the class identifier of the embedded application.
clear (address, br, Hn, pre, ...)
Specifies the position of the element in relation to floating objects.
code (applet, object)
Sets the name of the Java class file that contains the Java applet.
codeBase (applet, object)
Sets the base location that relative URLs specified in the classid, data and archive attributes are relative to.
codeType (applet, object)
Sets the MIME type (media type) of the application that should be used by the object element.
color (basefont, font, hr)
Sets the color of the text or line.
cols (frameset)
Sets the widths of the columns within a frameSet element. All frame elements in the same column has the same width as the column.
cols (table)
Specifies the number of columns in a table.
cols (textarea)
Specifies the width of a textArea, in characters.
cols (pre)
Specifies the preferred count of characters for each line in a pre element. If a line is longer than the specified character count, the browser tries to wrap it.
colSpan (td, th)
Sets how many columns wide a cell should be.
COMPACT (dir, dl, menu, ol, ul)
Sets whether extra space between list items should be removed.
content (meta)
Sets or returns the meta information itself.
contentEditable
3
Sets whether the contents of the object are editable.
coords (a, area)
Sets the position of a shape. You can select the type of shape with the shape attribute.
data (object)
Sets the location of the data for an object.
dataFld
Specifies which field of a given data source should be bound to the specified object.
dataFormatAs
Specifies how data is to be rendered.
dataPageSize (table)
Sets the number of records that can be displayed in a table when data binding is used.
dataSrc
Sets the identifier of the data source that is bound to the element.
dateTime
Sets the timestamp when a deletion or insertion was made.
DECLARE (applet, object)
Sets whether an object is only a declaration (it isn't downloaded until it's needed).
defer (script)
3.5
Sets whether the script is going to generate any document content.
dir
Sets the text direction as related to the lang attribute.
direction (marquee)
Specifies in which direction the marquee should scroll.
DISABLED
Sets the state of an object for user interaction.
draggable
3.55
Sets whether an element is draggable.
dynsrc (img, input:image)
Sets the location of a movie file or VRML.
encType (form)
Sets how form data should be encoded for submitting to the server.
event (script)
Sets an event that the script element should listen for.
face (basefont, font)
Specifies the font face for a page or for a font element.
for (label)
Sets the identifier of the object to which the label element is attached. The label element can be used to associate information with controls.
for (script)
Sets the identifier of the element to which the script is bound when a specific event is fired for the element.
frame (table)
Sets which borders of a table element should be displayed.
frameBorder (frame, frameset, iframe)
Sets whether the frame is surrounded by a 3-D border.
frameSpacing (frameset)
Sets the space between frames in pixels.
galleryImg (img, input:image)
7
Sets whether the My Pictures toolbar in Internet Explorer is enabled for the current img.
headers (td, th)
Sets a list of header cells that provide header information for the current data cell.
height (embed, iframe, img, table, ...)
Specifies the height of an element.
HIDDEN (embed)
Specifies a string value that indicates whether an embed object is visible.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
href (base)
Sets the base URL to be used throughout the document for relative URL addresses.
href (a, area, link)
Specifies the location of the destination.
hrefLang (a, link)
Sets the language of a linked resource or anchor element.
hSpace (iframe, img, object, ...)
Specifies the number of pixels to use as a margin at the left and right sides of the object.
http-Equiv (meta)
Sets information for HTTP response message headers. Use it with the content attribute to create a well-defined meta tag.
id
Sets a unique identifier for the object.
INCREMENTAL (input:search)
Specifies what type of user actions fire the onsearch event.
ISMAP (img)
Sets a Boolean value that indicates whether an img is a server-side or client-side image map.
keyType (keygen)
Sets the type of encryption used by the keygen element.
label (optgroup)
Sets the text to show as the contents of the option group element.
label (option)
Sets a short label for an option element.
lang
Specifies the language of the element.
language (script, a, abbr, ...)
Sets the scripting language for the current element. Use it only for the script element.
leftMargin (body)
Sets the left margin for the document body in pixels.
link (body)
Sets the color of the hypertext links in the entire document that have not been visited and activated yet.
longDesc (frame, iframe, img)
Specifies the URI (Uniform Resource Identifier) of the long description of a frame, iframe or img element.
loop (marquee)
Specifies the number of times a marquee is to be played.
loop (bgsound, img, input:image)
Specifies the number of repeats for a sound or video clip.
loop (embed)
Sets the type of repetition of the embedded media.
lowsrc (img, input:image)
Specifies the location of a lower resolution image to display.
marginHeight (frame, iframe)
Sets the top and bottom margins for a frame element.
marginWidth (frame, iframe)
Sets the left and right margins for a frame element.
max (input:range)
Sets the maximum value of a range type input object (slider).
maxLength (input, isindex)
Sets the maximum number of characters allowed in a text box.
MAYSCRIPT (applet, embed)
Indicates whether the Java applet is allowed to access the scripting objects of the web page.
media (link, style)
Specifies the media types for style definition.
method (form)
Specifies how the data of a form should be submitted to the server. When the user clicks on the submit button of a form, the data of the named elements in the form will be sent. The data contains the name and the value of the named element.
methods (a)
Specifies a comma-separated list of HTTP METHODS supported by the object and accessible to the user.
min (input:range)
Sets the minimum value of a range type input object (slider).
MULTIPLE (keygen, select)
Sets whether more than one item from a list can be selected.
MULTIPLE (input:file)
3.6
Sets whether more than one file can be selected with the current input:file element.
name (meta)
Sets the name given to the meta information. Use it with the content attribute attribute to create a well-defined meta tag.
name (input, select, textarea, ...)
Sets the name of a form control that affects the contents of the message submitted to the server.
name (param)
Specifies what data is being passed in the value attribute to the object.
name (a)
Sets the name of a target anchor.
name (frame, iframe)
Sets the initial name of the contained window.
name (map)
Sets the name of an image map that helps to establish a relationship between an image and an image map.
name (abbr, acronym, address, ...)
Sets the name of an element.
NOHREF (area)
Sets whether an area is a link.
NORESIZE (frame)
Specifies whether a frame window is resizable.
NOSHADE (hr)
Specifies whether the horizontal rule should be displayed as flat instead of three dimensional.
NOWRAP (body, dd, div, dt, td, th)
Specifies whether the text in a table cell can be wrapped.
placeholder (input, isindex)
Sets the initial value of the text field.
pluginsPage (embed)
Sets the URL for installing a plug-in. If an embedded plug-in is not accessible on the client site, the URL can be used by the browser to download and install the required component.
pluginUrl (embed)
Sets the URL for installing a plug-in. If the embedded plug-in is not accessible on the client site, the URL can be used to download and install the required component by the browser.
Same as the pluginsPage attribute, use that for a standard cross-browser solution.
point-size (font)
Specifies an explicit point size for the font.
pqg (keygen)
This attribute appears to be a security string to be sent and verified.
profile (head)
Specifies one or more URIs for a meta-information dictionary.
prompt (isindex)
Specifies a prompt message for the input field.
READONLY (input, textarea, ...)
Sets whether the contents of the element are changeable.
rel (a, link)
Specifies the relationship between the current document and the destination of an anchor or link.
results (input:search)
Specifies how many elements are visible in the dropdown list of the search history.
rev (a, link)
Specifies a reverse relationship from an anchor or link to the current document.
rightMargin (body)
Sets the right margin for the document body in pixels.
rows (frameset)
Sets the heights of the rows within a frameSet element. All frame elements in the same row have the same height as the row.
rows (textarea)
Sets the number of visible rows within a textArea element.
rowSpan (td, th)
Specifies how many rows high a table cell should be.
rowSpan (td, th)
Specifies how many rows high a table cell should be.
rules (table)
Specifies which borders will appear between cells within a table.
scheme (meta)
Specifies how the value of content should be interpreted, when name is used.
scope (td, th)
Sets the type of header information that belongs to a table cell.
scroll (body)
Sets the state of the document window's scrollbars.
scrollAmount (marquee)
Sets the width in pixels between successive displays of the scrolling text in a marquee.
scrollDelay (marquee)
Specifies the time delay between successive displays of the text in a marquee element in milliseconds.
scrolling (frame, iframe)
Sets whether a frame has scrollbars.
security (frame, iframe)
Applies the user's Restricted Sites Internet Explorer security zone settings to an individual frame or iframe.
SELECTED (option)
Specifies the initial state of an option element.
shape (a, area)
Sets the shape type of the selectable region for a hypertext or an area.
size (hr)
Sets the height of the horizontal rule.
size (keygen, select)
Specifies the count of the visible option items in a selection list. The selection list can be a select element or the selection list of a keygen element.
size (basefont, font)
Specifies the size of the font.
size (input, isindex, ...)
Specifies the width of a control, in characters.
span (col, colgroup)
Specifies the number of columns in a column group that share the settings defined in the col element.
spellcheck
Sets whether the automatic spellchecker is enabled.
src (embed, iframe, img, xml, ...)
Sets the location of an associated file for an object.
src (bgsound)
Sets the URL of a sound file to be played.
src (script)
Sets the location of a file containing scripting code.
standby (applet, object)
Specifies a text message that will be displayed while the object is loading.
standby (applet, object)
Specifies a text message that will be displayed while the object is loading.
start (ol)
Specifies the starting number for an ordered list.
start (img, input:image)
Specifies the starting time of a video clip.
step (input:range)
Sets the discrete step size of the input:range element.
style
Sets an inline style associated with an element.
summary (table)
Specifies a summary of the data represented in a table.
suppress (img)
Sets whether the browser should be display the ALT text in the placeholder.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
target (a, area, base, form, link)
Specifies the target window or frame where the document is to be opened.
text (body)
Specifies the color of the text in the document body.
title
Specifies a tooltip for an element.
topMargin (body)
Specifies the thickness of the top margin in the document body.
TRUESPEED (marquee)
Sets whether the value of the scrollDelay attribute should be taken as an exact value or not.
type (button)
Sets the type of a button.
type (param)
Specifies the MIME type of the resource referenced by the value attribute. The type attribute can be used only if the value of the valueType attribute is set to 'ref'.
type (dir, li, menu, ol, ul)
Specifies the numbering style of a list.
type (style)
Specifies the type of style sheet language.
type (script)
Sets the type of scripting language to use.
type (input)
Sets the type of the input element.
type (a, embed, link, object, ...)
Specifies the content type (MIME type) of the object or the linked object.
units (embed)
Specifies the measurement system used for the height and width attributes of an embed object.
unSelectable
Sets whether the selection process can start in an element's content.
urn (a)
Specifies a Uniform Resource Name (URN) for a linked object.
useMap (applet, img, object, ...)
Sets the URL to use as an image map.
vAlign (caption)
Specifies the vertical position of the caption element within a table.
vAlign (col, tbody, td, tr, ...)
Specifies the vertical alignment of the text within an object.
value (input, isindex)
Specifies the initial value for a control element.
value (li)
Specifies the number of a list item.
value (param)
Specifies the value of a run-time parameter specified by name.
value (option)
Specifies the value of an option element.
valueType (param)
Specifies the type of the object that is set with the value attribute.
vCard_name (input(password, text))
Specifies the vCard type to use for the Autocomplete box.
version (html)
Specifies which HTML DTD version governs the current document.
vLink (body)
Sets the color of the visited hypertext links in the entire document.
volume (bgsound)
Specifies the volume for the background sound.
vSpace (iframe, img, object, ...)
Specifies the number of pixels to use as a margin at the top and bottom sides of an object.
width (embed, iframe, img, table, ...)
Specifies the default width of the element.
width (pre)
Specifies the preferred count of characters for each line in a pre element. If a line is longer than the specified character count, the browser will try to wrap it.
wrap (textarea)
Specifies the word wrapping behavior.
xml:lang
Sets the language code of the XML document.
xmlns (html)
Declares a namespace for custom tags.
User Contributed Comments

Post Content

Post Content