HTML (HyperText Markup Language) is the language every web page is written in. As a file, .html or .htm, you most often meet it in three situations: a web page saved with Ctrl+S, an attachment from a bank, shop or booking system (statements, receipts, newsletters), and exports from other programs, such as browser bookmarks or reports from accounting and testing tools.
Origin and versions
Tim Berners-Lee proposed the World Wide Web at CERN in 1989 and described the first set of HTML tags in 1991. The first formal standard was HTML 2.0, published by the IETF as RFC 1866 in 1995. The W3C followed with HTML 3.2 (1997), HTML 4.01 (1999), the stricter XML-based XHTML 1.0 (2000) and HTML5 (2014). Since 2019 there is only one HTML standard: the HTML Living Standard maintained by WHATWG, the group of browser makers, and continuously updated rather than released in numbered versions.
What an HTML file can and cannot contain
An HTML file is plain text with tags such as <p>, <table> or <a href="…">. It describes structure and text. Everything else is usually separate:
- Images, styles and scripts are only referenced by address. When a browser saves a “complete” page, it writes the .html file plus a folder named
…_fileswith these resources. Move the HTML without the folder and the page loses its images and layout. - Single-file variants: images can be embedded directly as
data:URIs, and Chrome and Edge can save a page as “Webpage, Single File” in the MHTML format (.mhtml), which bundles everything into one file. - Encoding: a line like
<meta charset="utf-8">tells the browser how to read the characters. If it is missing, accented letters may appear garbled. - Active content: an HTML file can run JavaScript and contain forms that send data anywhere. Phishing e-mails often use HTML attachments that imitate a login page. Open HTML attachments from unknown senders with care and never type passwords into a page opened from a file.
How to open and edit HTML
- Viewing: any browser on any system. Double-click the file, or drag it into a browser window.
- Editing the code: Notepad, TextEdit in plain-text mode, or free editors such as Visual Studio Code, which highlight tags and check syntax.
- Editing as a document: Microsoft Word and LibreOffice Writer open simple HTML pages as editable documents.
- Phone: on Android, open the file from the Files app in a browser. On an iPhone, the Files app shows a preview; for full display, open it in a browser through the share menu where available.
Common problems
HTML file opens in Notepad instead of the browser
The file association changed, often after installing an editor. Right-click the file, choose Open with, pick your browser and set it as the default.
Saved web page has no images or looks broken
The …_files folder is missing or was renamed, or the page loads its content with JavaScript from the server. Save the page as a single file (MHTML) or print it to PDF from the browser instead.
Strange characters instead of accents
The page has no charset declaration or a wrong one. Add <meta charset="utf-8"> to the <head> and save the file as UTF-8.
Converting HTML
To keep a page exactly as the browser shows it, the browser’s own Print > Save as PDF is the most faithful method. Our converter treats HTML as a document: it reads the text, headings, lists, tables and links and turns them into DOCX, ODT, RTF, PDF, EPUB, Markdown or plain text. That works well for reports, exported tables, e-mail bodies and simple articles. Keep in mind that JavaScript is not run, modern CSS layouts are simplified, and images or stylesheets loaded from the web or from a separate _files folder are not included, because only the uploaded file is processed. Documents such as DOCX, ODT or RTF can be converted to HTML as well, which gives you clean UTF-8 markup for a website or e-mail.
HTML in brief
| Creator | Tim Berners-Lee, CERN (1989–1991) |
|---|---|
| Maintained by | WHATWG (HTML Living Standard), previously IETF and W3C |
| First standard | HTML 2.0, RFC 1866 (1995) |
| Type | text-based markup language |
| Media type | text/html; recommended encoding UTF-8 |
| Compression | none in the file (web servers compress during transfer) |
| Typical use | web pages, e-mail bodies, receipts and statements, exported reports |
Technical description of HTML5: Library of Congress.