Supported HTML attributes

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

A

Attribute

Value

Description

Parent elements

Availability

abbr

Text

Specifies an abbreviated form of content for a table cell.

<td>, <tr>

3.7 or later

accept

Content types

Specifies a comma-separated list of content types that are accepted as input for a form.

<form>, <input>

3.7 or later

accept-charset

Charset

Specifies list of character encodings that are accepted as input for a form.

<form>

4.6 or later

action

URL

Specifies a URL to which form content is submitted.

<form>

3.7 or later

align

Aligns an element.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

Alignable elements

4.6 or later

alink

Color

Specifies the color of a link, when the link is selected by the user.

Not supported in HTML 5. Use CSS styles instead.

<body>

6.0 or later

alt

Text

Specifies alternative text for an element.

<area>, <img>, <input>

3.7 or later

archive

List of URLs

Specifies a space-separated list of URLs for resources relevant to an object.

Not supported in HTML 5.

<object>

4.6 or later

autocomplete

on | off

Specifies whether the browser auto completes a field if the user returns to the page.

<form>, <input>

6.0 or later

autoplay

(Boolean attribute)

When present, specifies that a media file begins playing as soon as it is loaded.

Not fully implemented for BlackBerry® Device Software 6.0.

<audio>

6.0 or later

axis

List of categories

Specifies a comma-separated list of category names for a table cell or table header cell.

Not supported in HTML 5.

<td>, <th>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

B

Attribute

Value

Description

Parent elements

Availability

background

URL

Defines an image used as the background.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<body>

3.8 or later

behavior

alternate | scroll | slide

Specifies the scrolling behavior of the marquee text.

Non-standard.

<marquee>

4.6 or later

bgcolor

Color

Specifies a background color for the element.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<body>, <table>, <td>, <th>, <tr>

3.8 or later

border

Pixels

Specifies the border thickness for an element.

Not supported in HTML 5

<table>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

C

Attribute

Value

Description

Parent elements

Availability

cellpadding

Pixels

Specifies the number of pixels of whitespace to add between cells.

Not supported in HTML 5.

<table>

3.8 or later

cellspacing

Pixels

Specifies the number of pixels of whitespace that is rendered between each adjacent cell.

Not supported in HTML 5.

<table>

3.8 or later

char

Character

Specifies an alignment character for table data.

Not supported in HTML 5.

<col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>

6.0 or later

charoff

Length

Specifies the offset distance to the first occurence of the alignment character.

Not supported in HTML 5.

<col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>

6.0 or later

charset

Charset

Specifies the character encoding used in the referenced document; the value must be the name of a standard character set.

<a>, <link>, <script>

3.8 or later

checked

(Boolean attribute)

When present, specifies that, by default, the check box or radio button control is selected when the form is displayed.

<input>

3.8 or later

cite

URL

Specifies the URL of a document that provides citation information about the element.

<blockquote>, <del>, <ins>, <q>

4.6 or later

class

Text

Specifies one or more classes to which the element belongs. Classes provide a greater level of granularity when applying styles to elements.

Multiple classes can be applied as a whitespace-separated list.

All elements except: <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>

4.6 or later

classid

URL

Specifies the URL of the implementation of an embedded object.

Not supported in HTML 5.

<object>

4.6 or later

codebase

URL

Specifies the location of the code of an embedded object.

Not supported in HTML 5.

<object>

4.6 or later

codetype

Content type

Specifies the content tpe of the code embedded by an object.

Not supported in HTML 5.

<object>

4.6 or later

color

Color

Specifies the text color for font elements.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<basefont>, <font>

3.8 or later

cols

Integer > 0

Specifies the width of the text field control, in number of characters.

<textarea>

3.7 or later

colspan

Integer > 0

Specifies the number of columns that a table cell should span.

<td>, <th>

3.8 or later

compact

(Boolean attribute)

When present, indicates that spacing should be cmpressed for a list or menu.

<dir>, <dl>, <menu>, <ol>, <ul>

4.6 or later

content

Text

Specifies the value of the document metadata or pragma directive.

<meta>

3.7 or later

contenteditable

true | false

Specifies whether or not the content of element can the edited.

All visible elements.

6.0 or later

controls

(Boolean attribute)

When present, indicates that controls should be displayed for embedded media.

Not fully implemented in BlackBerry® Device Software 6.0.

<audio>,

6.0 or later

coords

List of integers

Specifies a comma-separated list of coordinates of key points of a shape in an image map.

<area>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

D

Attribute

Value

Description

Parent elements

Availability

data

URL

Specifies the location of the data for an embedded object

<object>

4.6 or later

datetime

Date and time string

Specifies the date and time that the contained content changed.

<del>, <ins>

4,6 or later

defer

(Boolean attribute)

When present, indicates that the script execution should be deferred.

<script>,

3.8 or later

dir

ltr | rtl

Specifies the directionality of text or tables in those instances where directionality is not inherently defined.

All elements except: <base>, <basefont>, <bdo>, <br>, <frame>, <frameset>, <iframe>, <param>, and <script>

4.6 or later

direction

left | right

Specifies the scrolling direction of the text.

Non-standard.

<marquee>

4.6 or later

disabled

(Boolean attribute)

When present, disables a form element.

<button>, <fieldset>, <input>, <optgroup>, <option>, <select>, <textarea>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

E

Attribute

Value

Description

Parent elements

Availability

enctype

Content type

Specifies the content type the form data is encoded with.

<form>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

F

Attribute

Value

Description

Parent elements

Availability

face

Text

Specifies a list of fontface names, listed in order of preference

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<basefont>, <font>

4.6 or later

for

ID reference

Specifies the id attribute ot the form control with which a label is associated.

<label>

4.6 or later

frame

above | below | border | box | hsides | lhs | rhs | void | vsides

Specifies which sides of the table cells are visible.

Not supported in HTML 5.

<table>

4.6 or later

frameborder

0 | 1

Specifies whether or not to display a frame border.

Not supported in HTML 5.

<frame>, <iframe>

6.0 or later

H

Attribute

Value

Description

Parent elements

Availability

headers

ID references

Specifies a space-separated list of cell ids that provide header information for the cell.

<td>, <th>

4.6 or later

height

Integer > 0

Specifies the vertical dimensions of the element.

Deprecated in HTML 4.01 for the <td> and <th> elements. Use CSS styles instead.

<canvas>, <iframe>, <img>, <object>, <td>, <th>

3.7 or later

href

URL

Specifies the URL for a link or area definition

Not supported in HTML 5

<a>, <area>, <base>, <link>

3.7 or later

hreflang

Language code

Defines the base language of a linked resource.

<a>, <link>

4.6 or later

hspace

Pixels

Specifies the amount of whitespace padding added to the left and right of the image.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<img>, <object>

4.6 or later

http-equiv

Pragma directive

Connects the content attribute to an HTTP header.

<meta>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

I

Attribute

Value type

Description

Parent elements

Availability

id

Text

Specifies a unique name for an element. This attribute has several purposes:

  • it can be used as a style sheet selector
  • it can be used as a target anchor for a link
  • it can be used as a means of referring to an element in a JavaScript®
  • it can be used as the name of a declared object element
  • it can be used for general processing by the browser
All elements except: <base>, <head>, <html>, <meta>, <script>, <style>, or <title>.

3.7 or later

ismap

(Boolean attribute)

When present, indicates that the image is a server-side image map.

<img>

6.0 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

L

Attribute

Value

Description

Parent elements

Availability

label

Text

Soecifies provides a label for an option or option group.

<optgroup>, <option>

4.6 or later

lang

Language code

Specifies the base language of an element's values and text content.

All elements except: <base>, <basefont>, <br>, <frame>, <frameset>, <iframe>, <param>, or <script>

4.6 or later

language

Script language

Defines the language of a script.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<script>

3.8 or later

link

Color

Specifies the color of an unvisited link.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<body>

3.8 or later

longdesc

Text

Specifies the location of a document that provides a long description of the image.

<frame>, <iframe>, <img>

4.6 or later

loop

(Boolean attribute)

When present indicates that the media should restart upon reaching the end of the file.

<audio>

6.0 or later

loop

Number | infinite

Specifies the number of times the marquee should repeat.

Non-standard.

<marquee>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

M

Attribute

Value type

Description

Parent elements

Availability

manifest

URL

Specifies the location of the manifest file that specifies resources that must be available while the device is offline.

<html>

6.0 or later

marginheight

Pixels

Specifies the height of the margins in a frame.

<frame>, <iframe>

4.6 or later

marginwidth

Pixels

Specifies the width of the margins in a frame.

<frame>, <iframe>

4.6 or later

max

Dependent on the input type

Specifies the maximum value for a form control.

<input>

5.0 or later

maxlength

Number of characters

Specifies maximum number of characters that are permitted in a text field.

<input>

3.7 or later

method

get | post

Specifies the HTTP method used to send the form data to the server.

<form>

3.7 or later

min

Dependent on the input type

Specifies the manimum value for a form control.

<input>

5.0 or later

multiple

(Boolean attribute)

When present, indicates that multiple items can be sleced in a selection list.

<select>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

N

Attribute

Value type

Description

Parent elements

Availability

name

Text

Specifies the name of a form or form control.

<button>, <fieldset>, <form>, <input>, <select>, <textarea>

3.7 or later

name

Text

Specifies the name of a nested browsing context.

<iframe>, <object>

4.6 or later

name

Text

Specifies a unique name for the image map. The value must match the corresponding value for the usemap attribute in the <img> element in which it is referenced.

<map>

3.8 or later

name

Metadata name

Specifies the type of metadata being defined by the content attribute.

The BlackBerry® Browser supports the non-standard values viewport and HandheldFriendly, which can be used to control the layout and scaling of your content in the browser window.

<meta>

4.6 or later

name

Text

Specifies a unique name for a parameter.

<param>

3.8 or later

nohref

(Boolean attribute)

When present, specifies that the area of the image map is inactive and does not link to another resource.

Not supported in HTML 5.

<area>

4.6 or later

noresize

(Boolean attribute)

When present, specifies that a frame cannot resize the frame.

Not supported in HTML 5.

<frame>

4.6 or later

nowrap

(Boolean attribute)

When present, specifies that the content within a table cell is not wrapped.

Not supported in HTML 5

<td>, <th>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

P

Attribute

Value type

Description

Parent elements

Availability

placeholder

Text

Specifies placeholder text for a text field before a value is entered. This text can be used to provide a hint to the user to aid in completing the text field.

<input>

5.0 or later

playcount

Number

Specifies the number of times a media file will loop.

<audio>

6.0 or later

profile

List of URLs

Specifies a whitespace-separated list of URLs that contain metadata about the document.

Not supported in HTML 5.

<head>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

R

Attribute

Value type

Description

Parent elements

Availability

readonly

(Boolean attribute)

When present, indicates that the user can not cahnge the value of the form control.

<input>

3.8 or later

rel

Text

Provides text that specifies the link relationship from the current document to the referenced target document.

<a>, <link>

4.6 or later

rev

Text

Provides text that specifies the link relationship from the referenced target document to the current document.

<a>, <link>

4.6 or later

rows

Number > 0

Specifies the number of lines of text the text field contains.

<textarea>

3.7 or later

rowspan

Number > 0

Specifies the number of rows a table cell spans.

<td>, <th>,

3.8 or later

rules

all | col | group | none | rows

Specifies where rules will be placed in a table.

<table>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

S

Attribute

Value type

Description

Parent elements

Availability

scheme

Text

Defines a format that is used to interpret the value of the content attribute.

<meta>

4.6 or later

scope

col | colgroup | row | rowgroup

Specifies which cells the header cell applies to.

<th>

4.6 or later

scrollamount

Pixels

Specifies the distance that the text moves each time the browser redraws the text.

Non-standard.

<marquee>

4.6 or later

scrolldelay

Milliseconds

Specifies the interval in which the browser redraws the text.

Non-standard.

<marquee>

4.6 or later

scrolling

auto | yes | no

Specifies whether scrollbars are displayed for the frame.

<frame>, <iframe>

4.6 or later

selected

(Boolean attribute)

When present, indicates that the option is initially selected.

<option>

3.7 or later

shape

default | rect | circle |poly

Specifies the shape of a region in an image map.

<area>

3.7 or later

size

Length

Specifies the size of a form control or font.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<basefont>, <font>, <hr>, <input>, <select>

3.7 or later

span

Number > 0

Specifies the number of columns spanned by the element.

<col>, <colgroup>

6.0 or later

src

URL

Specifies the URL of a resource.

<audio>, <frame>, <iframe>, <img>, <input>, <script>

3.7 or later

start

Number

Specifies the starting number for the list. Use styles instead.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<ol>

4.6 or later

style

CSS declaration

Applies an inline style to an element. Styles must be defined using CSS syntax.

All elements except: <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>

4.6 or later

summary

Text

Provides summary text describing the contents of the table.

<table>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

T

Attribute

Value type

Description

Parent elements

Availability

target

Text | _blank | _parent | _self | _top

Defines the target window for a hyperlink or browsing context. You can specify your own window name, or select a predefined keyword.

<a>, <area>, <base>, <form>

4.2 or later

text

Color

Specifies the color of the text in an HTML document.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<body>

4.0 or later

title

Text

Specifies annotative information about an element or its content.

All elements except: <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>

4.6 or later

type

Content type

Specifies the MIME type of the target document or embedded resource.

<a>, <area>, <link>, <object>, <script>, <source>, <style>,

4.6 or later

type

reset | submit | button

Defines the button type.

button

4.6 or later

type

Input type

Specifies the type of form control that you want to add to the form.

<input>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

U

Attribute

Value type

Description

Parent elements

Availability

usemap

URL

Specifies the URL for an image map on a document.

<img>

3.7 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

V

Attribute

Value type

Description

Parent elements

Availability

valign

URL

Vertically aligns an element.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>

3.8 or later

value

Text

Specifies the value to be used for form submission.

<button>, <option>

3.7 or later

value

Dependent on the input type

Specifies the value of the form control.

<input>

3.7 or later

value

Text

Specifies the value of the parameter.

<param>

3.8 or later

value

Integer

Specifies the ordinal value of a list item.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<li>

3.8 or later

valuetype

data | object | ref

Specifies the value type for a <param> element within an object definition.

Not supported in HTML 5.

<param>

3.8 or later

vlink

Color

Specifies the color of a visited link.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<body>

6.0 or later

vspace

Pixels

Specifies the amount of whitespace padding added to the left and right of the image.

Deprecated in HTML 4.01. Not supported in HTML 5. Use CSS styles instead.

<img>, <object>

4.6 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

W

Attribute

Value type

Description

Parent elements

Availability

width

Integer > 0

Specifies the horizontal dimensions of an element.

Deprecated for <td> and <th> in in HTML 4.01. Use CSS styles instead.

<canvas>, <iframe>, <img>, <object>, <td>, <th>

3.7 or later

wrap

soft | hard

Specifies how the input of a textarea field wraps.

<textarea>

6.0 or later

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Next topic: Input types
Previous topic: V

Was this information helpful? Send us your comments.