HTML elements supported by the Rich Text Box

A list of HTML elements that are supported by the Rich Text Box.

Hierarchical list of HTML elements (select an element name to be taken to the table with further details):

Newlines in character data are ignored. Character data can occur in style, p, h1, h2, h3, h4, h5, h6, li, span, b, strong, and i elements.

Table 1. Supported HTML elements
Name Description Number of occurrences Supported properties
a

Specifies a hyperlink.

Multiple times
b

Specifies bold text.

Multiple times
body

Defines the document's body.

Once
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
br

Inserts a single line break.

Multiple times
del

Specifies deleted or replaced text. Displays as strikethrough.

Multiple times
div

Defines a paragraph. It differs from the p element in that it has no default margins and it can be nested.

The element supports the optional “align” attribute that specifies the alignment of the text within a paragraph. The allowed values are “left”, “right”, “center”, and “justified”.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
em

Specifies emphasized text.

Multiple times
h1, h2, h3, h4, h5, h6

Defines a heading. h1 defines the most important heading, while h6 defines the least important heading.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
html

Root tag of the document. Cannot occur in any other place.

Once (required)
i

Specifies italic text.

Multiple times
img

Defines an image.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
ins

Specifies inserted text. Displays as underlined.

Multiple times
li

Defines a list item.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
mark

Specifies marked text.

Multiple times
ol

Defines an ordered list.

The ol element supports the “start” attribute that specifies the number of the first item of the list (default = 1).

The element supports the “type” attribute that specifies the list marker:

  • 1: Decimal numbers (1, 2, 3). The default.
  • a: Alphabetical order, lowercase (a, b, c)
  • A: Alphabetical order, uppercase (A, B, C)
  • i: Roman numerals, lowercase (i, ii, iii)
  • I: Roman numerals, uppercase(I, II, III)
Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
p

Defines a paragraph.

The element supports the optional “align” attribute that specifies the alignment of the text within a paragraph. The allowed values are “left”, “right”, “center”, and “justified”.

The element has a default margin-top and margin-bottom of 1em.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
pre

Defines a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
s

Specifies text that is no longer correct, accurate, or relevant. Displays as strikethrough.

Multiple times
span

Provides no visual change, but is used to:

  • Group inline-elements.
  • Apply CSS attributes for a run of text.
Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width
strong

Specifies strong text.

Multiple times
style

Defines global CSS style rules. The style element, if present, must be the first element within the html element.

Once (optional)
sub

Specifies subscripted text.

Multiple times
sup

Specifies superscripted text.

Multiple times
ul

Defines an unordered (bulleted) list.

Multiple times
  • width, height
  • color, background-color
  • font-family, font-size, font-style, font-weight
  • margin, margin-top, margin-right, margin-bottom, margin-left
  • padding, padding-right, padding-bottom, padding-left
  • border-color, border-top-color, border-right-color, border-bottom-color, border-left-color
  • border-style, border-top-style, border-right-style, border-bottom-style, border-left-style
  • border-width, border-top-width, border-right-width, border-bottom-width, border-left-width