webMathematica`

HTMLTableForm

HTMLTableForm[data, opts]

formats data into an HTML table

HTMLTableForm[data, fun, opts]

uses the function fun to format each element

Details

  • The HTML functions are contained in a package, MSP`HTML`, which is loaded as part of the webMathematica layout.
  • If you wish to use it in Mathematica outside of webMathematica, you will need to install and load it separately.
  • The default formatting function for HTMLTableForm is HTMLFormat.
  • Any string arguments to HTMLTableForm are assumed to be already formatted and no more formatting is applied. This allows it to take the output of other MSP functions such as MSPShow or HTMLFormat.
  • HTMLTableForm takes the following options.
  • TableHeadingsheadings for the table
    TableAttributesattributes to apply to the HTML table

Examples

Basic Examples  (1)

You can demonstrate how the function works by installing and loading the package:

The function HTMLTableForm takes an input and formats it into an HTML table.

It takes a TableHeadings option, which works similarly to that of TableForm.

If you wish to apply special formatting to each element, you can provide a formatting function as a second element. The formatting function must return a string. Here every element is formatted into MathML.