Elements supported in rich text items
Rich text items support all XHTML character entities, such as (non-breaking
space), and the following elements:
a, div, span,
ul, ol, and li.
Each element supports only the style attribute, which must contain a valid CSS style. In
addition, ul and ol elements support list-style attributes.
Specifically, the ol element supports decimal, and the ul element
supports circle, disc, and square, as well as list-style-image.
For example, the following code produces an unordered list entitled List: with three items. Each list item is in a different color, and the list-style attribute used is circle.
<div style="font-size:14pt; text-decoration:underline">List:</div>
<ul style="list-style-type:circle">
<li style="color:green">Item <span style="font-weight:bold">A</span></li>
<li style="color:red">Item B</li>
<li style="color:blue">Item C</li>
</ul>
The
a element defines a hyperlink, which is used to link from one page to
another. The supported attributes for the a element are:class: A space-separated list of the classes of the element.style: Contains CSS styling declarations to be applied to the element.href: A URL that the hyperlink points to.target: Where to display the linked URL, as the name for a browsing context.
For example, the following code produces a URL that opens the website www.ibm.com in a new window or tab.
<a href="https://www.ibm.com/" target="_blank">IBM</a>
Tip:
If you want to render
more elements than div, span, ul, ol, and li, try enclosing the rich text in
<HTML> tags. When rich text is enclosed in <HTML> tags,
IBM®
Cognos® Analytics with Watson
supports more element types. For example, the following code produces the output The word text is bold and the word italics is italicized..
<html>The word <strong>text</strong> is bolded and the word <em>italics</em> is italicized.<html>