Advanced Techniques: Formatting with HTML Tags

If you have administrator privileges, then you’ll see the option Contains HTML Markup on some dialogs.

This option allows you to format content with valid HTML markup, including JavaScript. If you include additional formatting, prefix the HTML markup with “@”. Devices that don’t support custom formatting just ignore markup after “@” and display the content without formatting .

For example, this HTML markup sets the width and height of a column in tables and pivot tables. The prefix @[html] means to apply HTML.

@[html]<span style="width:200px; height:50px>@</span>

The Contains HTML Markup option is available wherever you can apply formatting:

  • For analyses:

    • In the Analysis Editor.

    • In the Analysis Properties dialog.

    • In the Column Properties dialog.

    • In the New Calculated Measure dialog.

  • For dashboards:

    • In the Dashboard Properties dialog.

Here are some examples. If you find an example that is similar to what you want to do, copy and paste the example and tailor it to your needs.

HTML Element Usage Notes and Examples

Text

Any HTML tags can be used to control the format of the text. For example:

  • To center the text in the section:

    <CENTER>Centered Text</CENTER>

  • To make the text bold:

    <B>Bold Text</B>

  • To set font size and color:

    <FONT SIZE="4" COLOR="red">Red Text</FONT>

You can also combine tags for additional effects:

<CENTER><B><FONT COLOR="red">Bold Centered Red Text</FONT></B></CENTER>

JavaScript

Use self-contained scripts supported by the browser. Paste or type the script into the HTML text window, including the begin and end tags <script> and </script>.

Specify JavaScript in the opening <SCRIPT> tag: <SCRIPT LANGUAGE="javascript"> .