Supported HTML attributes

A

Attribute

Value type

Description

Parent elements

Availability

abbr

Text

Specifies an abbreviated form of content for a table cell.

<td> , <tr>

3.7+

accept

Content types

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

<form> , <input>

3.7+

accept-charset

Charset

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

<form>

4.6+

accesskey

Character

Specifies an access key for an element.

<a> , <area> , <button> , <input> , <label> , <legend> , <textarea>

6.0+

action

URL

Specifies a URL to which form content is submitted.

<form>

3.7+

align

Aligns an element.

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

Alignable elements

4.6+

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+

alt

Text

Specifies alternative text for an element.

<area> , <img> , <input>

3.7+

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+

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+

autocomplete

on | off

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

<form> , <input>

6.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+

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+

B

Attribute

Value type

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+

behavior

alternate | scroll | slide

Specifies the scrolling behavior of the marquee text.

Non-standard.

<marquee>

4.6+

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+

border

Pixels

Specifies the border thickness for an element.

Not supported in HTML 5

<table>

4.6+

C

Attribute

Value type

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+

cellspacing

Pixels

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

Not supported in HTML 5.

<table>

3.8+

challenge

6.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+

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+

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+

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+

cite

URL

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

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

4.6+

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+

classid

URL

Specifies the URL of the implementation of an embedded object.

Not supported in HTML 5.

<object>

4.6+

codebase

URL

Specifies the location of the code of an embedded object.

Not supported in HTML 5.

<object>

4.6+

codetype

Content type

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

Not supported in HTML 5.

<object>

4.6+

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+

cols

Integer > 0

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

<textarea>

3.7+

colspan

Integer > 0

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

<td> , <th>

3.8+

compact

— (Boolean attribute)

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

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

4.6+

content

Text

Specifies the value of the document metadata or pragma directive.

<meta>

3.7+

contenteditable

true | false

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

All visible elements.

6.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+

coords

List of integers

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

<area>

3.7+

D

Attribute

Value type

Description

Parent elements

Availability

data

URL

Specifies the location of the data for an embedded object

<object>

4.6+

datetime

Date and time string

Specifies the date and time that the contained content changed.

<del> , <ins>

4,6+

defer

— (Boolean attribute)

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

<script> ,

3.8+

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+

direction

left | right

Specifies the scrolling direction of the text.

Non-standard.

<marquee>

4.6+

disabled

— (Boolean attribute)

When present, disables a form element.

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

4.6+

E

Attribute

Value type

Description

Parent elements

Availability

enctype

Content type

Specifies the content type the form data is encoded with.

<form>

3.7+

F

Attribute

Value type

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+

for

ID reference

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

<label>

4.6+

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+

frameborder

0 | 1

Specifies whether or not to display a frame border.

Not supported in HTML 5.

<frame> , <iframe>

6.0+

H

Attribute

Value type

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+

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+

href

URL

Specifies the URL for a link or area definition

Not supported in HTML 5

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

3.7+

hreflang

Language code

Defines the base language of a linked resource.

<a> , <link>

4.6+

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+

http-equiv

Pragma directive

Connects the content attribute to an HTTP header.

<meta>

3.7+

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+

ismap

— (Boolean attribute)

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

<img>

6.0+

L

Attribute

Value type

Description

Parent elements

Availability

label

Text

Specifies provides a label for an option or option group.

<optgroup> , <option>

4.6+

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+

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+

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+

longdesc

Text

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

<frame> , <iframe> , <img>

4.6+

loop

— (Boolean attribute)

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

<audio> , <video>

6.0+

loop

Number | infinite

Specifies the number of times the marquee should repeat.

Non-standard.

<marquee>

4.6+

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>

3.7+

marginheight

Pixels

Specifies the height of the margins in a frame.

<frame> , <iframe>

3.7+

marginwidth

Pixels

Specifies the width of the margins in a frame.

<frame> , <iframe>

3.7+

max

Dependent on the input type

Specifies the maximum value for a form control.

<input>

3.7+

maxlength

Number of characters

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

<input>

3.7+

method

get | post

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

<form>

3.7+

min

Dependent on the input type

Specifies the manimum value for a form control.

<input>

3.7+

multiplemultiple

— (Boolean attribute)

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

<select>

3.7+

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+

name

Text

Specifies the name of a nested browsing context.

<iframe> , <object>

4.6+

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+

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+

name

Text

Specifies a unique name for a parameter.

<param>

3.8+

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+

noresize

— (Boolean attribute)

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

Not supported in HTML 5.

<frame>

4.6+

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+

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+

rel

Text

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

<a> , <link>

4.6+

rev

Text

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

<a> , <link>

4.6+

rows

Number > 0

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

<textarea>

3.7+

rowspan

Number > 0

Specifies the number of rows a table cell spans.

<td> , <th> ,

3.8+

rules

all | col | group | none | rows

Specifies where rules will be placed in a table.

<table>

4.6+

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+

scope

col | colgroup | row | rowgroup

Specifies which cells the header cell applies to.

<th>

4.6+

scrollamount

Pixels

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

Non-standard.

<marquee>

4.6+

scrolldelay

Milliseconds

Specifies the interval in which the browser redraws the text.

Non-standard.

<marquee>

4.6+

scrolling

auto | yes | no

Specifies whether scrollbars are displayed for the frame.

<frame> , <iframe>

4.6+

selected

(Boolean attribute)

When present, indicates that the option is initially selected.

<option>

3.7+

shape

default | rect | circle | poly

Specifies the shape of a region in an image map.

<area>

3.7+

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+

span

Number > 0

Specifies the number of columns spanned by the element.

<col> , <colgroup>

6.0+

src

URL

Specifies the URL of a resource.

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

3.7+

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+

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+

summary

Text

Provides summary text describing the contents of the table.

<table>

4.6+

T

Attribute

Value type

Description

Parent elements

Availability

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+

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+

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

type

Content type

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

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

4.6+

type

reset | submit | button

Defines the button type.

<button>

4.6+

type

Input type

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

<input>

3.7+

U

Attribute

Value type

Description

Parent elements

Availability

usemap

URL

Specifies the URL for an image map on a document.

<img>

3.7+

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+

value

Text

Specifies the value to be used for form submission.

<button> , <option>

3.7+

value

Dependent on the input type

Specifies the value of the form control.

<input>

3.7+

value

Text

Specifies the value of the parameter.

<param>

3.8+

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+

valuetype

data | object | ref

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

Not supported in HTML 5.

<param>

3.8+

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+

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+

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

3.7+

wrap

soft | hard

Specifies how the input of a textarea field wraps.

<textarea>

6.0+

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus