Home Page | Table of Contents | View MTX File | Previous Page | Next Page

Tables


Introduction | MTX Table Format | Examples

Introduction

Tables are one of the most advanced HTML formatting capabilities. Tables consist of several elements:

Web browsers dynamically display tables based on the current window size, font selection, and other parameters. While it is possible to create exquisitely customized HTML tables, the communication value of a table tends to decrease in proportion to its complexity. MTX provides a simplified and flexible format for defining tables.

MTX Table Format

Use a leading vertical bar (|) to tag lines that will become part of a table. Each new line becomes a row in the table. Use additional vertical bars (|) to delimit columns within each row of a table. Here is an example:

  |A Simple Table
  |      |*col 1|*col 2|*col 3
  |*row 1|one   |two   |three
  |*row 2|four  |five  |six
  |*row 3|seven |eight |nine

The first line of the table contains the caption and other formatting information. Leave this line empty or use the "none" switch to suppress the caption. Place a leading star (*) character in a cell to create a row or column heading. Empty cells will be blank unless they contain a single star (*) character. Place a leading caret (^) to force the text in a cell to be top aligned (the default is vertically centered). Use spaces to pad lines for better source file readability. Use the line break tag {BR} to force a line break within a cell.

It is possible to have a cell that spans more than one column. Use the back slash (\) character followed by the number of columns to span:

  |col 1 |span\2 |col 4

By default, tables will expand to fill 95% of the width of the current window. This can be overridden by using the "nowide" switch after the caption. The table border can be suppressd by using the "noborder" switch. Blank cells can be suppressed for the entire table by using the "noblanks" switch. These switches can be combined by adding additional vertical bars (|). Here are some examples:

  |A Skinny Table|nowide
  |An Invisible Table|noborder
  |A Skinny, Invisible Table|nowide|noborder
  |A Table with No Blanks|noblanks

Tables are not universally available. Current versions of Netscape and NCSA Mosaic support tables. Web browsers from America Online and certain other online services do not. [3.2]

Examples

A Simple Table
col 1 col 2 col 3
row 1 one two three
row 2 four five six
row 3 seven eight nine
A More Complex Table
col 1 col 2 col 3
row 1 one
two
three
Flower Picture
row 2 This is a long line of text that must all fit in the cell. five six
row 3 hypertext link nine
row 4 ten and eleven twelve
A Skinny Table
col 1 col 2 col 3
row 1 one two three
row 2 four five six
row 3 seven eight nine
An Invisible Table
col 1 col 2 col 3
row 1 one two three
row 2 four five six
row 3 seven eight nine
A Skinny, Invisible Table
col 1 col 2 col 3
row 1 one two three
row 2 four five six
row 3 seven eight nine
A Table with No Blanks
  col 1 col 2 col 3
row 1     row 2   five row 3      
|^23
Small Group
Class |^24
Small Group |^25
Small Group
Class |^26
Small Group
Midterm Review |^27
Small Group
   Author: Richard Rathe / rrathe@dean.med.ufl.edu
  Version: MTX 2.0 User's Manual
Copyright: 1996-97 by Richard Rathe
 Location: http://www.med.ufl.edu/medinfo/mtx/docs/tables.html
  Created: June 1, 1996   Modified: July 7, 1997

Home Page | Table of Contents | View MTX File | Previous Page | Next Page
A Calendar Table
September 1996
Monday Tuesday Wednesday Thursday Friday
2
Labor Day
3
Small Group
Video Interview
Class
4
Small Group
Video Interview
5
Small Group
Video Interview
6
Small Group
Video Interview
9
Small Group
Clinic
Class
10
Small Group
Clinic
11
Small Group
Clinic
12 13
16 17
Unit 1 Exam
18
Unit 1 Exam
19
Small Group
Clinic
20
Small Group
Clinic