HTMLTableForm


formats data into an HTML table


uses the function fun to format each element

DetailsDetails

  • 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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

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

In[1]:=
Click for copyable input

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

In[2]:=
Click for copyable input
Out[2]=

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

In[3]:=
Click for copyable input
Out[3]=

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.

In[4]:=
Click for copyable input
Out[4]=