This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

XHTMLMathML (.html, .htm, .xhtml, .xht, .xml)

Registered MIME type: application/xhtml+xml
XHTML with embedded MathML.
Plain text XML format.
Describes the structure and aspects of the appearance of web pages, including typeset mathematical formulas.
  • Import fully supports XHTML versions 1.0 and 1.1.
  • Export generates documents conforming to XHTML 1.1 and MathML 2.0.
  • Import gives a plain text representation of an XHTML+MathML file.
  • Import extracts tabular data from XHTML+MathML.
  • Export creates an XHTML+MathML version of expr.
  • Export translates expr to XHTML+MathML, saving the output in the specified directory.
  • Import returns a string, representing the textual content of the file as formatted plain text.
  • Export exports a notebook, a cell, a list of cells, or other notebook elements to XHTML, formatting all typeset expressions as MathML.
  • Export always creates a complete XHTML+MathML document.
  • The output consists of one or more XHTML+MathML files and two directories, HTMLFiles and HTMLLinks.
  • Mathematica always converts typeset expressions to MathML when exporting to XHTML+MathML.
  • Mathematica can export Tooltip and Hyperlink expressions, creating HTML image maps if necessary.
  • Import imports the specified element from an XHTML+MathML file.
  • Import imports multiple elements.
  • Export creates an XHTML+MathML file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
  • Save Selection As exports the selected part of a notebook to XHTML+MathML.
  • Save As exports an entire notebook to XHTML+MathML.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
"Data"textual and numerical content from HTML table and list elements
"FullData"full tabular content, including empty HTML table and list elements
"Hyperlinks"hyperlinks, given as a list of strings
"Plaintext"XHTML+MathML document formatted as text
"Images"images embedded in the XHTML document
"Source"raw XHTML+MathML source as a single string
"Title"XHTML page title
"ImageLinks"URLs of embedded images
"XMLObject"symbolic XML representation of the entire document
  • Import by default uses the element.
"Notebook"a Notebook expression
"NotebookObject"a NotebookObject expression
"Expression"an arbitrary Mathematica expression
"ConvertLinkedNotebooks"Falsewhether to convert linked notebooks to HTML
"Content"Falsewhether to export MathML content elements
  • See the "HTML" format page for complete information about supported Import and Export options.
Read an XHTML file as plain text:
Show the Import elements available in this file:
Import the tabular content from this file:
This exports a mathematical expression to HTML:
Read an XHTML file as plain text:
In[1]:=
Click for copyable input
Out[1]=
Show the Import elements available in this file:
In[2]:=
Click for copyable input
Out[2]=
Import the tabular content from this file:
In[3]:=
Click for copyable input
Out[3]//TableForm=
 
This exports a mathematical expression to HTML:
In[1]:=
Click for copyable input
Out[1]=