Tables

HoTMetaL provides a convenient table model that can be displayed by Web browsers.

Inserting a table

You can insert a table by clicking on the TABLICON toolbar button or by choosing the Insert Table... command in the Markup menu.

This gives you a dialog box that lets you specify the number of rows and columns in the table. The [Insert] button in this dialog box will be grayed-out if it is invalid to insert a table at the current insertion point.

All tables in HoTMetaL will be the same width as the document window.

Properties

The Cell Properties... and Row Properties... commands in the Markup menu let you change the appearance of a table. These settings will affect how the table is displayed in a browser, depending on the browser's capabilities.

Vertical alignment

The vertical alignment specifies whether a cell's content is aligned with the top, middle, or bottom of the cell. Vertical alignment can be set for a particular cell or row: a setting for a cell takes precedence over a row setting. To set the vertical alignment:

Horizontal alignment

Horizontal alignment (justification) specifies how the text in a table cell is aligned with the sides of the cell. Your choices are left, right, centered, and justify (that is, aligned on both sides). Horizontal alignment can be set for a particular cell or row: a setting for a cell takes precedence over a row setting. To set the vertical alignment:

Column/cell width

By default, when a column is displayed in a browser its width will be adjusted to the longest piece of text in any cell in the column. To set the width of a cell explicitly (this sets it for the whole column containing the cell):

The value you should enter for the width depends on what the browser expects. Netscape currently interprets a value that you enter as a number of (screen) pixels. Other browsers may interpret the width value differently, or even ignore it. An alternative is to use cell spanning instead: for example, a cell that spans over two cells will be displayed twice as wide as a normal cell.

If more than one cell in a column has a width setting, the longest one is used.

The width setting does not affect how the table is displayed by HoTMetaL.

Wrapping

By default, the content of a cell will wrap when it is displayed in the browser, that is, it will be displayed over several lines rather than one long line. If you want wrapping turned off for the current cell:

To turn wrapping off for the current row:

Some browsers may ignore these settings.

Adding and deleting rows and columns

You can add or delete a single row or column using the Edit Table... command.

When you select Edit Table... you will get a palette containing several buttons.

The six buttons along the bottom of the palette carry out the following operations:

If you insert a row or column, it adopts the defaults of the current row or column. You cannot delete a column if it has one or more cells that span an adjoining column; similarly, you cannot delete a row if has one or more cells that span an adjoining row. If you still want to perform the deletion, you will have to contract the spanning cells (see the next section, Spanning table cells).

Spanning table cells

The Edit Table... command allows you to change the spanning of the cell containing the insertion point

Eight icons at the top of the palette extend and contract cells.

Extending cells

Extending a cell is like `knocking out the wall' between cells. The cell-extending icons, in clockwise order from the top, are:

There are some rules about extending cells:

Contracting cells

The cell-contracting icons, in clockwise order from the top, are:

General information

This section contains general information and advice on using tables

Table border

The `table border' refers to the lines that form the boundary of each table cell when the file is displayed in a browser. The BORDER attribute of the TABLE element controls the appearance of the border. To modify it, do the following:

A value for BORDER may be interpreted differently from browser to browser. In particular, the numerical values may not be recognized by some browsers.

Table caption

To give a table a caption:

Table header

Table cells are represented by the TD element. Cells can be changed to TH (table header) elements by putting the insertion point in the appropriate cells and choosing the Change... command. If you simply wish to bolden the text, we suggest that you insert a B or STRONG element inside the table cell(s) instead of changing the table cell element.

Nested tables

HoTMetaL does not support `nested tables', that is, tables inside tables.

Reformatting tables

Sometimes tables that were not created with HoTMetaL's graphical table editor will not display nicely in HoTMetaL. Here are some things you can try to improve the appearance: