Supported HTML attributes

A

Attribute

Value type

Description

Parent elements

abbr

Text

Specifies an abbreviated form of content for a table cell.

<td>, <tr>

3.7+

1.0+

accept

Content types

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

<form>, <input>

3.7+

1.0+

accept-charset

Charset

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

<form>

4.6+

1.0+

action

URL

Specifies a URL to which form content is submitted.

<form>

3.7+

1.0+

align

Aligns an element.

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

Alignable elements

4.6+

1.0+

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+

1.0+

alt

Text

Specifies alternative text for an element.

<area>, <img>, <input>

3.7+

1.0+

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+

1.0+

audio

muted

Specifies a space-separated list of values used to override user audio preferences when playing a video file. Currently, muted is the only value that can be specified.

<video>

6.1+

1.0+

autocomplete

on | off

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

<form>, <input>

6.0+

1.0+

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

6.0+

1.0+

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+

1.0+

Back To Top

B

Attribute

Value type

Description

Parent elements

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+

1.0+

behavior

alternate | scroll | slide

Specifies the scrolling behavior of the marquee text.

Non-standard.

<marquee>

4.6+

1.0+

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+

1.0+

border

Pixels

Specifies the border thickness for an element.

Not supported in HTML 5

<table>

4.6+

1.0+

Back To Top

C

Attribute

Value type

Description

Parent elements

cellpadding

Pixels

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

Not supported in HTML 5.

<table>

3.8+

1.0+

cellspacing

Pixels

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

Not supported in HTML 5.

<table>

3.8+

1.0+

char

Character

Specifies an alignment character for table data.

Not supported in HTML 5.

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

6.0+

1.0+

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+

1.0+

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+

1.0+

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+

1.0+

cite

URL

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

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

4.6+

1.0+

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+

1.0+

classid

URL

Specifies the URL of the implementation of an embedded object.

Not supported in HTML 5.

<object>

4.6+

1.0+

codebase

URL

Specifies the location of the code of an embedded object.

Not supported in HTML 5.

<object>

4.6+

1.0+

codetype

Content type

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

Not supported in HTML 5.

<object>

4.6+

1.0+

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+

1.0+

cols

Integer > 0

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

<textarea>

3.7+

1.0+

colspan

Integer > 0

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

<td>, <th>

3.8+

1.0+

compact

— (Boolean attribute)

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

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

4.6+

1.0+

content

Text

Specifies the value of the document metadata or pragma directive.

<meta>

3.7+

1.0+

contenteditable

true | false

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

All visible elements.

6.0+

1.0+

controls

— (Boolean attribute)

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

Not fully implemented in BlackBerry Device Software 6.0.

<audio>, <video>

6.0+

1.0+

coords

List of integers

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

<area>

3.7+

1.0+

Back To Top

D

Attribute

Value type

Description

Parent elements

data

URL

Specifies the location of the data for an embedded object

<object>

4.6+

1.0+

datetime

Date and time string

Specifies the date and time that the contained content changed.

<del>, <ins>

4,6+

1.0+

defer

— (Boolean attribute)

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

<script>,

3.8+

1.0+

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+

1.0+

direction

left | right

Specifies the scrolling direction of the text.

Non-standard.

<marquee>

4.6+

1.0+

disabled

— (Boolean attribute)

When present, disables a form element.

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

4.6+

1.0+

Back To Top

E

Attribute

Value type

Description

Parent elements

enctype

Content type

Specifies the content type the form data is encoded with.

<form>

3.7+

1.0+

Back To Top

F

Attribute

Value type

Description

Parent elements

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+

1.0+

for

ID reference

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

<label>

4.6+

1.0+

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+

1.0+

frameborder

0 | 1

Specifies whether or not to display a frame border.

Not supported in HTML 5.

<frame>, <iframe>

6.0+

1.0+

Back To Top

H

Attribute

Value type

Description

Parent elements

headers

ID references

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

<td>, <th>

4.6+

1.0+

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

3.7+

1.0+

href

URL

Specifies the URL for a link or area definition

Not supported in HTML 5

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

3.7+

1.0+

hreflang

Language code

Defines the base language of a linked resource.

<a>, <link>

4.6+

1.0+

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+

1.0+

http-equiv

Pragma directive

Connects the content attribute to an HTTP header.

<meta>

3.7+

1.0+

Back To Top

I

Attribute

Value type

Description

Parent elements

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+

1.0+

ismap

— (Boolean attribute)

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

<img>

6.0+

1.0+

Back To Top

L

Attribute

Value type

Description

Parent elements

label

Text

Specifies provides a label for an option or option group.

<optgroup>, <option>

4.6+

1.0+

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+

1.0+

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+

1.0+

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+

1.0+

longdesc

Text

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

<frame>, <iframe>, <img>

4.6+

1.0+

loop

— (Boolean attribute)

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

<audio>, <video>

6.0+

1.0+

loop

Number | infinite

Specifies the number of times the marquee should repeat.

Non-standard.

<marquee>

4.6+

1.0+

Back To Top

M

Attribute

Value type

Description

Parent elements

manifest

URL

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

<html>

3.7+

1.0+

marginheight

Pixels

Specifies the height of the margins in a frame.

<frame>, <iframe>

3.7+

1.0+

marginwidth

Pixels

Specifies the width of the margins in a frame.

<frame>, <iframe>

3.7+

1.0+

max

Dependent on the input type

Specifies the maximum value for a form control.

<input>

3.7+

1.0+

maxlength

Number of characters

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

<input>

3.7+

1.0+

method

get | post

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

<form>

3.7+

1.0+

min

Dependent on the input type

Specifies the manimum value for a form control.

<input>

3.7+

1.0+

multiple

— (Boolean attribute)

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

<select>

3.7+

1.0+

Back To Top

N

Attribute

Value type

Description

Parent elements

name

Text

Specifies the name of a form or form control.

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

3.7+

1.0+

name

Text

Specifies the name of a nested browsing context.

<iframe>, <object>

4.6+

1.0+

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+

1.0+

name

Metadata name

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

The BlackBerry Browser supports the following non-standard values:

  • viewport and HandheldFriendly, which can be used to control the layout and scaling of your content in the browser window.
  • cursor-event-mode and touch-event-mode, which can be used to prevent the device UI from intercepting user events, so that your web page can access raw touch and cursor events.
<meta>

4.6+

1.0+

name

Text

Specifies a unique name for a parameter.

<param>

3.8+

1.0+

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+

1.0+

noresize

— (Boolean attribute)

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

Not supported in HTML 5.

<frame>

4.6+

1.0+

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+

1.0+

Back To Top

P

Attribute

Value type

Description

Parent elements

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 +

1.0+

poster

URL

Specifies the location of an image to be used while a video file is loading.

<video>

7.0 +

1.0+

preload

none | metadata | auto

Provides a hint to the browser about what data, if any, should be preloaded.

<audio>, <video>

6.0 +

1.0+

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 +

1.0+

Back To Top

R

Attribute

Value type

Description

Parent elements

readonly

— (Boolean attribute)

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

<input>

3.8+

1.0+

rel

Text

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

<a>, <link>

4.6+

1.0+

rev

Text

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

<a>, <link>

4.6+

1.0+

rows

Number > 0

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

<textarea>

3.7+

1.0+

rowspan

Number > 0

Specifies the number of rows a table cell spans.

<td>, <th>,

3.8+

1.0+

rules

all | col | group | none | rows

Specifies where rules will be placed in a table.

<table>

4.6+

1.0+

Back To Top

S

Attribute

Value type

Description

Parent elements

scheme

Text

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

<meta>

4.6+

1.0+

scope

col | colgroup | row | rowgroup

Specifies which cells the header cell applies to.

<th>

4.6+

1.0+

scrollamount

Pixels

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

Non-standard.

<marquee>

4.6+

1.0+

scrolldelay

Milliseconds

Specifies the interval in which the browser redraws the text.

Non-standard.

<marquee>

4.6+

1.0+

scrolling

auto | yes | no

Specifies whether scrollbars are displayed for the frame.

<frame>, <iframe>

4.6+

1.0+

selected

(Boolean attribute)

When present, indicates that the option is initially selected.

<option>

3.7+

1.0+

shape

default | rect | circle | poly

Specifies the shape of a region in an image map.

<area>

3.7+

1.0+

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+

1.0+

span

Number > 0

Specifies the number of columns spanned by the element.

<col>, <colgroup>

6.0+

1.0+

src

URL

Specifies the URL of a resource.

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

3.7+

1.0+

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+

1.0+

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+

1.0+

summary

Text

Provides summary text describing the contents of the table.

<table>

4.6+

1.0+

Back To Top

T

Attribute

Value type

Description

Parent elements

target

Text | _bottom | _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+

1.0+

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>

3.8+

1.0+

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

NA

type

Content type

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

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

4.6+

1.0+

type

reset | submit | button

Defines the button type.

<button>

4.6+

1.0+

type

Input type

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

<input>

3.7+

1.0+

Back To Top

U

Attribute

Value type

Description

Parent elements

usemap

URL

Specifies the URL for an image map on a document.

<img>

3.7+

1.0+

Back To Top

W

Attribute

Value type

Description

Parent elements

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

3.7+

1.0+

wrap

soft | hard

Specifies how the input of a textarea field wraps.

<textarea>

6.0+

1.0+

Back To Top
Previous topic: V

Was this information helpful? Send us your comments.