Highlighting in messages

From MozillaZine Knowledge Base
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

This article is about changing the background color of text to add emphasis in e-mail messages, similar to a highlighter pen on paper. For example:

Text with a yellow background

Thunderbird can display highlighting, but it does not provide an easy way to add highlighting.

Displaying highlighting

To display highlighting in messages, ensure that the menu choice View – Message Body As – Original HTML is selected.

Writing messages with highlighting

To add highlighting to messages that you write, you must write messages in HTML and send them in HTML. For more information, see: Mail content types

You can add highlighting by typing HTML tags, by using an existing text style, or by using an extension.

Note:  People who receive your messages might not see the highlighting, depending on their mail clients and preference settings. If you rely on highlighting to make the meaning of your message clear, then some people might find your messages confusing.

Typing HTML tags

To highlight a word or phrase by typing HTML tags, select the word or phrase and choose: Insert – HTML...   In the Insert HTML window, type tags around the word or phrase like this:

<span style="background-color: yellow;">word or phrase</span>

Using an existing text style

You can redefine an existing text style by adding a style rule to your message. You can even add more than one rule to provide highlighting in more than one color.

You can add the style rule in an individual message , or you can add the code to an HTML signature file or a template.

For example, here is a style rule that redefines the existing bold text style. When you make text bold, you see it with a yellow background instead. Other people who receive your messages will also see the yellow background if their mail clients support it, otherwise they will see bold if their mail clients support that.

<style type="text/css">b {font-weight: normal; background-color: yellow;}</style>

To redefine the existing italic style:

<style type="text/css">i {font-style: normal; background-color: lime;}</style>

To redefine the existing underline style:

<style type="text/css">u {text-decoration: none; background-color: cyan;}</style>

For other styles in the Format – Text Style menu, you can discover the tag to redefine by selecting some text in the middle of a line and applying the style. Then select the entire line and choose Insert – HTML... to see the tag name. For example, if you do this with the Citation style, you can see that the tag name is cite. Then you can make a style rule like one of the examples above, redefining the style for cite.

Using an extension

The Mail Tweak extension has a "permanent pen" feature that you can use to highlight text that you type. It cannot highlight existing quoted text, and it only supports one color.

External links

Web colors