Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
HTML (.html, .htm)
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • Markdown
    • HTMLFragment
    • EPS
    • GIF
    • LaTeX
    • MathML
    • NB
    • PDF
    • RTF
    • SVG
    • TeX
    • XHTML
    • XHTMLMathML
  • Related Guides
    • Creating Web Pages
    • Document Formats
    • Graphics Importing & Exporting
    • Importing & Exporting
    • Importing & Exporting in Notebooks
    • Listing of All Formats
    • Numerical Data
    • Processing Textual Data
    • Web Formats
    • Web Operations
  • Tech Notes
    • Wolfram System Internet Connectivity
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • Markdown
      • HTMLFragment
      • EPS
      • GIF
      • LaTeX
      • MathML
      • NB
      • PDF
      • RTF
      • SVG
      • TeX
      • XHTML
      • XHTMLMathML
    • Related Guides
      • Creating Web Pages
      • Document Formats
      • Graphics Importing & Exporting
      • Importing & Exporting
      • Importing & Exporting in Notebooks
      • Listing of All Formats
      • Numerical Data
      • Processing Textual Data
      • Web Formats
      • Web Operations
    • Tech Notes
      • Wolfram System Internet Connectivity
IMPORT/EXPORT FORMAT
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • Markdown
    • HTMLFragment
    • EPS
    • GIF
    • LaTeX
    • MathML
    • NB
    • PDF
    • RTF
    • SVG
    • TeX
    • XHTML
    • XHTMLMathML
  • Related Guides
    • Creating Web Pages
    • Document Formats
    • Graphics Importing & Exporting
    • Importing & Exporting
    • Importing & Exporting in Notebooks
    • Listing of All Formats
    • Numerical Data
    • Processing Textual Data
    • Web Formats
    • Web Operations
  • Tech Notes
    • Wolfram System Internet Connectivity
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • Markdown
      • HTMLFragment
      • EPS
      • GIF
      • LaTeX
      • MathML
      • NB
      • PDF
      • RTF
      • SVG
      • TeX
      • XHTML
      • XHTMLMathML
    • Related Guides
      • Creating Web Pages
      • Document Formats
      • Graphics Importing & Exporting
      • Importing & Exporting
      • Importing & Exporting in Notebooks
      • Listing of All Formats
      • Numerical Data
      • Processing Textual Data
      • Web Formats
      • Web Operations
    • Tech Notes
      • Wolfram System Internet Connectivity

HTML (.html, .htm)

  • Import fully supports HTML version 4.01.
  • Output from Export[…,"HTML"] conforms to the XHTML 1.1 standard.

Background & Context

    • Registered MIME type: text/html
    • HTML markup language and file format.
    • Predominant language for the creation of web pages.
    • HTML is an acronym derived from Hypertext Markup Language.
    • Plain text format.
    • Describes the structure and aspects of the appearance of web pages.
    • First published in 1993 as an Internet Engineering Task Force (IETF) working draft.
    • Maintained since 1996 by the World Wide Web Consortium (W3C).
    • Most recent version is 4.01, published in 1999 as W3C recommendation.
    • International standard ISO/IEC 15445:2000.
    • Predecessor of XHTML.

Import & Export

  • Import["file.html"] gives a plain text representation of an HTML file.
  • Import["file.html","Data"] extracts tabular data from HTML.
  • Export["file.html",expr] creates an HTML version of expr.
  • Export["dir",expr] translates expr to HTML, saving the output in the specified directory.
  • Import["file.html"] returns a string, representing the textual content of the file as formatted plain text.
  • Export["file.html",expr] exports a notebook, a cell, a list of cells, or other notebook elements to HTML.
  • Export always creates a complete HTML document, and not merely a fragment of HTML.
  • The output consists of one or more HTML files and two directories, HTMLFiles and HTMLLinks.
  • The Wolfram Language by default converts typeset expressions to GIF images when exporting to HTML.
  • The Wolfram Language can export Tooltip and Hyperlink expressions to HTML, creating HTML image maps if necessary.
  • Import["file.html",elem] imports the specified element from an HTML file.
  • Import["file.html",{elem,suba,subb,…}] imports a subelement.
  • Import["file.html",{{elem1,elem2,…}}] imports multiple elements.
  • The import format can be specified with Import["file","HTML"] or Import["file",{"HTML",elem,…}].
  • Export["file.html",expr, elem] creates an HTML file by treating expr as specifying element elem.
  • Export["file.html",{expr1,expr2,…},{{elem1,elem2,…}}] treats each expri as specifying the corresponding elemi.
  • Export["file.html",expr,opt1->val1,…] exports expr with the specified option elements taken to have the specified values.
  • Export["file.html",{elem1->expr1,elem2->expr2,…},"Rules"] uses rules to specify the elements to be exported.
  • See the following reference pages for full general information:
  • Import, Exportimport from or export to a file
    CloudImport, CloudExportimport from or export to a cloud object
    ImportString, ExportStringimport from or export to a string
    ImportByteArray, ExportByteArrayimport from or export to a byte array

Notebook Interface

  • Save Selection As exports the selected part of a notebook as a web page.
  • Save As exports an entire notebook as a web page.

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Import elements:
  • "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
    "Images"images embedded in the HTML document
    "Plaintext"HTML document formatted as text
    "Source"raw HTML source as a single string
    "Title"HTML page title
    "ImageLinks"URLs of embedded images
    "XMLObject"symbolic XML representation of the entire document
  • Import by default uses the "Plaintext" element.
  • When importing a plain HTML document as "XMLObject", the Wolfram Language will attempt to convert it to well-formed XHTML and import the resulting XML file.
  • Export elements:
  • "Notebook"a Notebook expression
    "NotebookObject"a NotebookObject expression
    "Expression"an arbitrary Wolfram Language expression

Options

  • Import options:
  • CharacterEncodingAutomaticraw character encoding to use when importing the file
    "Numeric"Truewhether to import data fields as numbers when possible
  • If the character encoding of the file is not specified in the HTML file, Import uses the encoding specified by CharacterEncoding. A complete list of possible encodings is given by $CharacterEncodings.
  • Using CharacterEncoding->Automatic, Import uses the encoding specified in the HTML file. If not specified, it uses "UTF8" encoding. If any sequence of bytes stored in the file cannot be represented in "UTF8", "ISOLatin1" is used.
  • The Wolfram Language always uses the UTF-8 encoding when exporting to HTML.
  • Export options:
  • "Content"Falsewhether to export MathML content elements
    "ConversionRules"Automaticspecifies mappings from Wolfram System cell styles to HTML elements, including both inline and block-level versions of the markup
    "ConvertClosed"Truewhether to export forward-closed cell groups
    "ConvertLinkedNotebooks"Falsewhether to convert linked notebooks to HTML
    "ConvertReverseClosed"Falsewhether to export reverse-closed cell groups
    "CSS"Automaticwhat CSS stylesheet to use or link to
    "FullDocument"Truewhether to export a complete HTML document
    "Graphics3DOutput"Automatichow to represent 3D graphics expressions
    "GraphicsOutput""GIF"how to represent graphics expressions
    "HeadAttributes"{}attributes to be inserted in HTML <head> tag, given as a list of rules
    "HeadElements"{}subelements of HTML <head> tag
    "ManipulateOutput""CDF"how to represent Manipulate expressions
    "MathOutput""GIF"how to represent typeset expressions
  • Possible settings for "GraphicsOutput", "Graphics3DOutput", "ManipulateOutput", and "MathOutput" are:
  • "CDF"converts the targeted expressions to embedded CDF
    "DisplayForm"converts the targeted expressions to ASCII approximations of their appearance
    "GIF"converts the targeted expressions to GIF
    "InputForm"converts the targeted expressions to their InputForm
    "PNG"converts the targeted expressions to PNG
    "JPEG"converts the targeted expressions to JPEG
    "SVG"converts the targeted expressions to SVG
  • "MathOutput"->"MathML" will convert all typeset expressions to MathML.
  • "Graphics3DOutput"->Automatic converts 3D graphics using the same method specified for "GraphicsOutput".
  • The choice of option to use for output conversion is based upon the type of the object at the top level of the cell. For example, a cell that contains only a 2D graphic will use "GraphicsOutput", while a cell that contains a 2D graphic embedded in typesetting or code will use "MathOutput".
  • Possible settings for "CSS" are:
  • Automaticcreates a CSS stylesheet from the Wolfram System stylesheet
    Nonedoes not create a stylesheet file or inline CSS style
    "file.css"uses a stylesheet file
  • Allowed settings for "ConvertClosed" and "ConvertReverseClosed" are:
  • Falsedoes not export closed groups
    Trueexports all cell groups
    "LinkedPage"exports each forward-closed group to a separate page

Examples

open all close all

Basic Examples  (3)

Import all images from a web page:

Read an HTML 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:

Show the names of the files saved into the "HTMLFiles" directory:

Import the rasterized typeset expression:

Scope  (5)

This translates a Cell expression to HTML:

The Wolfram Language can export graphics with embedded tooltips and hyperlinks to HTML image maps:

The mapping of Wolfram System style elements to HTML can be specified as "ConversionRules":

Export a formatted table to HTML:

Create an HTML fragment:

See Also

Import  ▪  Export  ▪  CloudExport  ▪  CloudImport 

Formats: Markdown  HTMLFragment  EPS  GIF  LaTeX  MathML  NB  PDF  RTF  SVG  TeX  XHTML  XHTMLMathML

Tech Notes

    ▪
  • Wolfram System Internet Connectivity

Related Guides

    ▪
  • Creating Web Pages
  • ▪
  • Document Formats
  • ▪
  • Graphics Importing & Exporting
  • ▪
  • Importing & Exporting
  • ▪
  • Importing & Exporting in Notebooks
  • ▪
  • Listing of All Formats
  • ▪
  • Numerical Data
  • ▪
  • Processing Textual Data
  • ▪
  • Web Formats
  • ▪
  • Web Operations

History

Introduced in 1999 (4.0) | Updated in 2010 (8.0)

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English