What is an HTML file?

HTML is the language of web pages. It is plain text with tags that a browser turns into a page. A single HTML file often depends on other files for pictures and styles.

Drop your file here

or select file

Images, video, audio, documents, data, archives, fonts and more.

About HTML file:

01HTML at a glance

Full name
HyperText Markup Language
Type
Text file that describes a web page
Extension
.html (also .htm and .xhtml)
MIME type
text/html
First bytes (hex)
No signature. Usually starts with <!DOCTYPE html>
Standard
HTML Living Standard (WHATWG)

02What is an HTML file

HTML is the language of web pages. An HTML file holds the text and the structure of a page: headings, paragraphs, lists, tables, links and places for pictures. A browser reads it and draws the page. Every browser on every device can open it.

A single HTML file is rarely the whole page. Pictures, styles (CSS) and scripts usually live in other files or on other websites. If you send only the .html file, they are missing and the page looks plain or broken. Put everything in one ZIP, or embed the pictures in the file.

The file should say which encoding it uses, for example <meta charset="utf-8">. Without it, a browser guesses, and letters outside English can turn into strange symbols. An HTML page has no page size: the layout depends on the browser window, and printing splits it into pages by itself.

HTML can contain scripts, so some mail systems and apps block it as an attachment. For a printable result, use the browser's Print > Save as PDF.

03Good and bad sides

Good

  • Opens in every browser, no extra software
  • Plain text: easy to edit with any editor
  • Links, images, tables and forms
  • Searchable and accessible when written well

Bad

  • Pictures and styles are often in other files
  • No fixed pages, so printing differs between browsers
  • Can contain scripts, so often blocked as an attachment
  • Print shops and print-on-demand services want PDF or images

04Best for

  • Web pages

    This is what HTML is made for.

  • Sharing a document as one file

    Only if the pictures and styles are embedded. Otherwise send a ZIP or a PDF.

05How to open it

All systems
Any web browser: Chrome, Safari, Firefox, Edge
Editing
Visual Studio Code, Sublime Text, Notepad++, any text editor
Mail and mobile
Often shown as text or blocked. Open it in a browser

06Convert and compare

Related formats: MD, PDF, TXT

Sources