HTML elements supported by the Rich Text Box
A list of HTML elements that are supported by the Rich Text Box.
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.
Name | Description | Number of occurrences | Child of | Can contain | Supported properties |
---|---|---|---|---|---|
html |
Root tag of the document. Cannot occur in any other place. |
Once (required) | style, body, p, div, h1, h2, h3, h4, h5, h6, a, ol, ul | ||
style |
Defines global CSS style rules. The style element, if present, must be the first element within the html element. |
Once (optional) | html | Character data | |
body |
Defines the document's body. |
Once | html | p, div, h1, h2, h3, h4, h5, h6, ul, ol | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
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 | html, body | span, br, b, strong, i, character data | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
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 | html, body, div | div, span, br, b, strong, i, character data | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
h1, h2, h3, h4, h5, h6 |
Defines a heading. h1 defines the most important heading, while h6 defines the least important heading. |
Multiple times | html, body | span, br, b, strong, i, character data | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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. |
span |
Provides no visual change, but is used to:
|
Multiple times | p, h1, h2, h3, h4, h5, h6, li | br, b, strong, i, character data | font-family, font-size, font-style, font-weight, background-color, color, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
img |
Defines an image. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li span | None | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
br |
Inserts a single line break. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
b |
Specifies bold text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
strong |
Specifies strong text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
em |
Specifies emphasized text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
mark |
Specifies marked text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
i |
Specifies italic text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
del |
Specifies deleted or replaced text. Displays as strikethrough. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
s |
Specifies text that is no longer correct, accurate or relevant. Displays as strikethrough. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
ins |
Specifies inserted text. Displays as underlined. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
sup |
Specifies superscripted text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
sub |
Specifies subscripted text. |
Multiple times | p, h1, h2, h3, h4, h5, h6, li, span | None | |
a |
Specifies a hyperlink. |
Multiple times | html, block, p, h1, h2, h3, h4, h5, h6, li, b, strong, em, mark, small, i, del, ins, span | None | |
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:
|
Multiple times | html, body | li (must contain at least one) | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
ul |
Defines an unordered (bulleted) list. |
Multiple times | html, body | li (must contain at least one) | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |
li |
Defines a list item. |
Multiple times | ol, ul | br, b, strong, i, character data | font-family, font-size, font-style, font-weight, background-color, color, width, height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-right, padding-bottom, padding-left, border-width, border-top-width, border-right-width, border-bottom-width, border-left-width, 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 |