References > " . "Element Reference"; $pagetitle="Description"; $customsidebar = "elemref-sidebar.php"; include "header.php"; ?>

Description

This element is used to create a block of text. The text can be set either with the value attribute or by placing text inside the open and close description tags. The value attribute is used to set text that appears in a single line. If text appears as a child of the description, it will wrap to multiple lines. If may contain arbitrary markup, which can be styled as needed.

More information about description

The description element implements the following interfaces:

nsIAccessibleProvider   nsIDOMXULDescriptionElement  

Attributes:

crop disabled value

Style Classes:

header indent monospace plain small-margin

Properties and Methods:

accessible crop disabled value

Attributes:

Inherited from XUL Element:

align
allowevents
allownegativeassertions
class
coalesceduplicatearcs
collapsed
container
containment
context
contextmenu
datasources
debug
dir
empty
equalsize
flags
flex
height
hidden
id
insertafter
insertbefore
left
maxheight
maxwidth
menu
minheight
minwidth
observes
ordinal
orient
pack
persist
popup
position
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width

crop

Type: one of the values below

If the label of the description is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cropped text. If the box direction is right to left (rtl), the cropping is reversed.

disabled

Type: boolean

Indicates whether the description is disabled or not. If this attribute is set to true, the description is disabled. This is usually drawn with the text in grey. If the description is disabled, it does not respond to user actions. The element cannot be focused and the command event will not fire. The element will still respond to mouse events. To enable the description, leave the attribute out entirely as opposed to setting the value to false.

value

Type: string

The text to be used for the description. The text will appear on a single line and will not wrap. Normally, you would not use a value attribute on a description element and instead place the text as the content inside the description tag.


Style Classes:

The following classes may be used to style the element. These classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected theme.

header

A class used for headings. Typically, this will cause the text to appear bold.

indent

This class causes the text to be indented on its left side.

monospace

This class causes the text to be displayed in a monospace font.

plain

This class causes the text to be displayed with no margin.

small-margin

This class causes the text to be displayed with a smaller margin.


Properties and Methods:

Inherited from XUL Element:

align
allowEvents
blur
boxObject
boxObject.element
boxObject.getLookAndFeelMetric
boxObject.height
boxObject.screenX
boxObject.screenY
boxObject.width
boxObject.x
boxObject.y
builder
className
click
collapsed
contextMenu
controllers
database
datasources
dir
doCommand
flex
focus
getElementsByAttribute
height
hidden
id
left
maxHeight
maxWidth
menu
minHeight
minWidth
observes
ordinal
orient
pack
persist
ref
resource
statusText
style
tooltip
tooltipText
top
width

Inherited from Element:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

accessible

Type: nsIAccessible

Returns the accessibility object for the description.

crop

Type: string

Gets and sets the value of the crop attribute.

disabled

Type: boolean

Gets and sets the value of the disabled attribute.

value

Type: string

Gets and sets the value of the value attribute.