HTMLTableForm[data,opts]
formats data into an HTML table.
HTMLTableForm[data,fun,opts]
uses the function fun to format each element.


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 Wolfram Web Engine layout.
- If you wish to use the function in the Wolfram Language outside of MSP pages, you will need to install the package and load it separately.
- The default formatting function for HTMLTableForm is HTMLFormat.
- Any string arguments to HTMLTableForm are assumed to already be formatted, and no more formatting will be applied. This allows it to take the output of other MSP functions such as MSPShow and HTMLFormat.
- HTMLTableForm takes the following options:
-
TableHeadings headings for the table TableAttributes attributes to apply to the HTML table
Examples
Basic Examples (1)
You can demonstrate how the function works by 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:
Text
Wolfram Research (1996), HTMLTableForm, Wolfram Language function, https://reference.wolfram.com/language/WolframWebEngine/ref/HTMLTableForm.html.
CMS
Wolfram Language. 1996. "HTMLTableForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/WolframWebEngine/ref/HTMLTableForm.html.
APA
Wolfram Language. (1996). HTMLTableForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/WolframWebEngine/ref/HTMLTableForm.html
BibTeX
@misc{reference.wolfram_2025_htmltableform, author="Wolfram Research", title="{HTMLTableForm}", year="1996", howpublished="\url{https://reference.wolfram.com/language/WolframWebEngine/ref/HTMLTableForm.html}", note=[Accessed: 25-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_htmltableform, organization={Wolfram Research}, title={HTMLTableForm}, year={1996}, url={https://reference.wolfram.com/language/WolframWebEngine/ref/HTMLTableForm.html}, note=[Accessed: 25-August-2025]}