HTML_TABLE Procedure
Creates an HTML table.
Usage
HTML_TABLE, table_text
Input Parameters
table_text—An (m, n) string array of text to put in a table with m columns and n rows. A 1D array builds an m-column, 1-row table.
Keywords
 
note
Whenever a specified attribute is not supported by a particular browser, the attribute is simply ignored by that browser.
Border—The size of the border around cells in the table.
Bottom—Places the cell content at the bottom of each cell.
Caption—The table caption.
CBottom—Table caption displayed beneath the table.
CellPadding—Specifies the space between the borders and the content of the cell.
CellSpacing—Specifies the space between each individual cell.
Center—Centers the cell content.
ColLabels—The column labels.
EqualWidth—Defines all cells as having the same width as the largest one used.
Left—Left-justifies the cell contents in the cell.
Middle—Places the content in the middle of each cell.
NoWrap—When set, the cell contents don’t wrap onto multiple lines within the cell.
Right—Right-justifies the cell contents in the cell.
RowLabels—The row labels.
Safe—Handles HTML special characters (see HTML_SAFE).
TCenterCenters the table on the page (left-right centering).
TLeftLeft-justifies the table on the page. (Default: set)
Top—Places the cell content at the top of each cell.
TRight—Right-justifies the table on the page.
Discussion
This procedure creates an HTML table.
Example
This example creates a captioned table with headings, which contains random data.
HTML_OPEN, Title = 'PV-WAVE HTML Output Example'
HTML_HEADING, 'Example HTML output from PV-WAVE'
; Get some data.
a = RANDOMN(seed, 100, 100)
b = RANDOMU(seed, 100, 100)
; Build a variable containing the numbers.
table_info = FLTARR(2, 5)
; The table contents needs to be text.
table_info(0, *) = [MIN(a), MAX(a), AVG(a), MEDIAN(a), STDEV(a)]
table_info(1, *) = [MIN(b), MAX(b), AVG(b), MEDIAN(b), STDEV(b)]
table_text = STRTRIM(STRING(table_info), 2)
; Build arrays of row and column headings.
col_titles = ['Normal Distribution', 'Uniform Distribution']
row_titles = ['Minimum', 'Maximum', 'Mean', $
   'Median', 'Standard Deviation']
; Make the table with a caption and labels.
HTML_TABLE, table_text, RowLabels=row_titles, $ 
   Caption='Two Random Number Sets', $
   ColLabels=col_titles, Border=1
HTML_CLOSE
See Also
For complete information on HTML tables, refer to HTML Sourcebook, Second Edition, by Ian S. Graham, John Wiley & Sons, Inc., 1996, New York.