<description> is used to create a block of text. There are two ways:

<description>This text will word wrap when displayed.<description>
<description label="This text will not word wrap when displayed."/>

It's simple. Text content will word wrap when displayed. Attribute will not.

<label>This text will word wrap when displayed.<label>
<label value="This text will not word wrap when displayed."/>
<button>This text will word wrap when displayed.<button>
<button label="This text will not word wrap when displayed."/>

Exception

e.g. radio element:

<radio label="This text will word wrap when displayed."/>

Why? Firefox expands this code to

<xul:hbox class="radio-spacer-box">
   <!-- **snip** -->
</xul:hbox>
<xul:hbox class="radio-label-center-box" flex="1">
  <xul:hbox class="radio-label-box">
    <xul:image class="radio-icon" src=""/>
    <xul:label class="radio-label" flex="1">
      This text will word wrap when displayed.
    </xul:label>
  </xul:hbox>
</xul:hbox>

The text "This text will word wrap when displayed." is expanded to text content (not attribute!) of label element.

e.g. richlistitem element:

<richlistitem>This text will not word wrap when displayed."</richlistitem>

I don't know why.

Effect of <html:br/>

(X)HTML's br element represents a line break. html:br element can be readily applied to XUL.

<description>This text is<html:br/> multiple line.<description>

html:br element can not be applied to attribute.

  • this code is invalid.
    <radio label="br can not be<html:br/> applied to attribute."/>
    
  • this radio button label is "br can not be<html:br/> applied to attribute."
    <radio label="br can not be&lt;html:br/&gt; applied to attribute."/>
    

See also