MozillaZine

Edit HTML source

From MozillaZine Knowledge Base

This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

When you compose an HTML message, you can insert HTML tags or edit existing HTML tags in the message:

  1. Optionally, to edit existing HTML tags, select part of the message, or select the entire message (for example, by pressing Ctrl+A or by choosing Edit -> Select All).
  2. Choose: Insert -> HTML...
  3. Edit the HTML code as desired.
  4. Press Insert.

See below for extensions that provide other ways to edit HTML tags.

Note:  Some people who receive your message might not see the effect of any changes that you make to HTML tags. For example, Thunderbird users might choose to display messages as plain text or as simple HTML, and webmail clients might change your HTML in various ways.

Advanced

An HTML message is a standard HTML document in two parts—the head and the body. Only the body contains HTML for display, so in Thunderbird you can only edit the body.

If you want to edit the head for some special purpose, then you can use an extension to edit it. However, even if you do edit the head, some mail clients that receive your message might ignore it.

For example if you plan to add a style tag containing CSS, the standard place for this in in the head, but adding it in the body might work better. See below for an external link to more information about CSS support in various mail clients.

Extensions

  • EditHTML can edit both the head and the message body. It adds a menu choice for this in the Format menu.
  • External editor can edit the head, the message body and some message headers in an external text editor. It adds a toolbar button for this, and a menu choice in the Tools menu. Version 0.7.3 of this extension has a bug that prevents changes to the head from being added to the message correctly. The authors home page has both the latest version that supports Thunderbird 2 and one that works with the beta version of Thunderbird 3.
  • Edit HTML Source can only edit the message body. It adds a menu choice in the View menu. However, it will not work with Thunderbird 1.5 or later even if you disable the version checking.
  • The experimental Compose add-on replaces the existing editor with one based on the CKEditor. See here for a list of its features. This add-on is a work in progress. Eventually, after its completed and they get enough feedback it may be built into Thunderbird instead.

See also

External links

  • CSS support in webmail Analysis of how some well-known webmail clients handle HTML messages
  • HTML Mozilla's technical information on HTML