.HTML

HTML File

HyperText Markup Language Web Page
Ask a question
QUICK ANSWER

An HTML file is a web page - plain text with markup tags that a browser turns into the formatted page you see. To view it, double-click and it opens in your browser (Edge, Chrome, Firefox, Safari). To edit the code, open it in a text editor such as Notepad++ or VS Code. The .html and .htm extensions are the same format - only the spelling differs.

Developer: W3C / WHATWG (HTML standard); originated by Tim Berners-Lee, CERN Category: Web Files Open standard MIME: text/html
OPENS ON Windows macOS Linux Android iOS Web

On this page

19k+ extensions indexed
Last reviewed Aug 30, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the HTML file format?

.html files are used by web browsers for rendering web pages.

.html files store information in plain text format. HTML is a markup language for creating web page content - it defines the structure of simple informational sites as well as the backbone of dynamic web applications. Web browsers use .html files to render websites based on the markup information stored in those files. The HTML source of any page can be viewed from the browser using the View Page Source command, available from the context menu opened by right-clicking on the page.

HTML markup language supports the following constructs:

  • markup tags that support properties (attributes),
  • data types,
  • references,
  • entities,
  • document type declarations (e.g. <!DOCTYPE html>).

HTML elements are used to structure the website and add content from external sources, including links to other websites, embedded media, forms and scripts. HTML also supports simple text formatting features such as size, font weight and emphasis. HTML is compatible with CSS styles and supports dynamic content such as video playback or interactive animations through linked JavaScript files.

Files with the .html extension store data in plain text format and can thus be easily edited using any text editor. However, it is recommended that .html files be edited using dedicated code editors to avoid potential errors. Such tools can automatically highlight keywords, correct syntax errors or autofill values. The .html and .htm extensions represent the same format - the shorter variant was a legacy workaround for older operating systems with three-character filename limits.

Security & safety

RISK: LOW

An .html file is plain text and is safe to open in a text editor. The caution is that HTML pages can embed JavaScript, which runs when you open the file in a browser - a malicious local .html could host a phishing page (a fake login form) or run scripts. Treat .html files from e-mail or untrusted downloads like any web page: don't enter credentials into an unexpected page, and open suspicious files in a text editor first to inspect them rather than letting a browser execute them. HTML "attachments" in e-mail are a known phishing technique.

Format details

in a nutshell
FULL NAMEHyperText Markup Language Web Pageaka HTML file, Web page
DEVELOPERW3C / WHATWG (HTML standard); originated by Tim Berners-Lee, CERNsince 1991 (first HTML by Tim Berners-Lee); HTML5 from 2014
CATEGORYWeb Files
MIME TYPEtext/html
TYPEPlain-text markup document (HTML)
STANDARDOpen · royalty-free

Programs that open HTML files

Windows5 apps
Mozilla Firefox Free Double-click or drag the file into Firefox to render it; Ctrl+U shows the source.
Windows Notepad Built-in Right-click > Open with > Notepad to read/edit the raw HTML text.
Notepad Open-source Right-click > Edit (or open in Notepad++) to view and edit the HTML source with syntax highlighting.
Microsoft Edge / Google Chrome Built-in Double-click the .html to view it rendered. Edge is the built-in default browser on Windows 11.
Visual Studio Code Free Open the .html to edit; use the Live Preview / Live Server extension to see changes instantly.
macOS3 apps
TextEdit Built-in Open as plain text (Format > Make Plain Text) to edit the raw HTML.
Safari Built-in Double-click to render the page in Safari, the built-in macOS browser.
Visual Studio Code Free Open the file to edit the HTML source; preview with the Live Server extension.
Linux2 apps
Firefox / Chromium / Google Chrome Open-source Double-click to render the page in your browser.
gedit / any text editor Open-source Open the file to view and edit the HTML source.
Android1 app
Chrome / any browser Free Open the .html via Files/Chrome to render it; use a code-editor app to edit the source.
iOS1 app
Safari / any browser Built-in Open the .html in Safari (or via Files) to render it; for editing use a code editor app.
Web1 app
CodePen / JSFiddle Free Paste the HTML to render and tweak it in the browser - handy for testing a snippet without local files.

Technical details

deep spec
MIME typetext/html
Alternative MIME typeapplication/xhtml+xml (XHTML variant)
Character encodingUTF-8 (recommended by the HTML standard; declared via `<meta charset>` or HTTP Content-Type header)
File signatureNo binary magic bytes; files typically begin with `<!DOCTYPE html>` or an `<html>` tag
ContainerPlain-text markup document
CompressionNone within the file itself; servers may compress content with gzip or Brotli during transfer
Typical file sizeA few KB to several hundred KB; images, CSS and scripts are referenced as separate external files
Document structureNested elements - `<html>` root containing `<head>` (metadata and links) and `<body>` (visible page content)
Alternative extension`.htm` (identical format; the shorter name was a legacy workaround for 8.3 filename limits)
ScriptingDynamic behaviour added via inline `<script>` blocks or externally linked `.js` files
StylingPresentation controlled via linked `.css` files, `<style>` blocks, or inline `style` attributes
Semantic elementsHTML5 introduced structural tags: `<article>`, `<section>`, `<nav>`, `<aside>`, `<header>`, `<footer>`
Accessibility markupWAI-ARIA roles and `aria-*` attributes can be embedded directly in HTML elements
Mobile viewport`<meta name="viewport">` tag controls layout scaling on small-screen and mobile devices
Standard maintenanceMaintained by WHATWG as a continuously updated Living Standard with no frozen version releases
Platform supportCross-platform; supported on Windows, macOS, Linux, Android and iOS wherever a web browser is present
Released1991 (first HTML by Tim Berners-Lee); HTML5 from 2014
Latest versionHTML Living Standard (WHATWG, continuously updated)
Open standardYes · royalty-free
Specificationhtml.spec.whatwg.org

HTML conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with HTML files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about HTML files.

Frequently asked questions

How do I open an .html file?
To view it, double-click - it opens in your default web browser (Edge, Chrome, Firefox, Safari). To edit the code, right-click and open it with a text/code editor like Notepad++ or VS Code.
What is the difference between .html and .htm?
None. They are the same HTML format. '.htm' is the old three-letter spelling from DOS/Windows (which limited extensions to three characters); '.html' is the four-letter form. Browsers and servers treat them identically.
How do I edit an .html file?
Open it in a code editor - VS Code or Notepad++ (both free) give syntax highlighting and live preview. Plain Notepad/TextEdit also work for quick edits. Save and reopen in a browser to see the result.
How do I convert an .html page to PDF?
Open the .html in a browser, press Ctrl+P (Cmd+P on Mac), and choose 'Save as PDF' as the destination. This saves the rendered page as a PDF.
How do I convert .html to Word (.docx)?
Open the .html in Microsoft Word, Google Docs or LibreOffice Writer and Save As .docx. Simple pages convert cleanly; pages with complex CSS layouts may shift.
Why does my saved web page have an extra _files folder?
When you 'Save Page As (Complete)', the browser saves the .html plus a folder of its images, CSS and scripts. Keep them together - the .html references that folder so the page displays correctly offline.
Is it safe to open an .html file from an email?
Be careful. HTML can run scripts and host fake login pages, so HTML email attachments are a common phishing trick. Don't enter passwords into an unexpected page; inspect a suspicious .html in a text editor before opening it in a browser.

References

1W3C - HTML (history and standards)www.w3.org
2MDN Web Docs - Introduction to HTMLdeveloper.mozilla.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.SB3Scratch 3.0 Project File

Related extensions

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z