HTML File Format (HyperText Markup Language)
HTML (HyperText Markup Language) is the standard markup language for documents designed to be displayed in a web browser. It was created by Tim Berners-Lee at CERN in 1991, with the first formal specification published in 1993. HTML describes the structure and meaning of content using a system of tags and attributes — headings, paragraphs, links, lists, images, tables, and forms — which the browser interprets and renders. It is plain text, so any text editor can read or write it. HTML is almost always paired with CSS for styling and JavaScript for interactivity. Modern HTML is defined by the WHATWG HTML Living Standard, a continuously updated specification that superseded the W3C HTML5 Recommendation finalized in 2014. As a document format, a standalone .html file is fully self-describing and renders identically across browsers without proprietary software. HTML is the foundation of every web page, and it is also a common export and conversion target for documents, emails, ebooks, and reports because it is universally viewable, accessible, searchable, and easy to repurpose.
Quick Facts
- Extension: .html, .htm
- MIME Type: text/html
- Category: document
Advantages
- Universally viewable in any web browser with no special software
- Human-readable plain text that any editor can open and edit
- Open, royalty-free standard maintained by WHATWG and W3C
- Semantic structure makes content accessible, searchable, and indexable
- Easily combined with CSS and JavaScript for styling and interactivity
Disadvantages
- Layout is reflowable, not fixed — pages can look different across screens and printers
- External CSS, images, and fonts can break if not bundled or inlined
- No native pagination or print-precise layout (use PDF for fixed pages)
- Rendering can vary slightly between browsers and versions
- Untrusted HTML can carry malicious scripts and requires sanitizing
Common Use Cases
- Web pages and the structure of every website
- Email newsletters and HTML email templates
- Exported reports, documentation, and reading-friendly articles
- Ebook content (EPUB chapters are XHTML files)
- Self-contained offline documents shared as a single file
Technical Details
An HTML document begins with a <!DOCTYPE html> declaration followed by a root <html> element containing <head> and <body> sections. The head holds metadata: the document title, character encoding (<meta charset="utf-8">), viewport settings, links to stylesheets, and SEO tags such as Open Graph and JSON-LD structured data. The body holds the visible content. Browsers parse the markup into a Document Object Model (DOM) tree, which CSS styles and JavaScript can manipulate. Elements are either block-level or inline and may carry global attributes (id, class, data-*) plus element-specific ones. HTML5 added semantic elements (header, nav, article, section, footer), native <audio> and <video>, the <canvas> drawing surface, and form input types. HTML is forgiving: browsers apply error-recovery rules to render malformed markup. XHTML is a stricter XML serialization of the same vocabulary.
Frequently Asked Questions about HTML
What is the difference between .html and .htm?
There is no difference in content. The shorter .htm extension dates back to early DOS and Windows systems that limited extensions to three characters. Both are treated identically by every browser and web server.
What is the difference between HTML and HTML5?
HTML is the language; HTML5 was the major fifth version finalized by the W3C in 2014 that added semantic elements, native audio and video, and the canvas element. Today the language is maintained as the continuously updated WHATWG HTML Living Standard, so there are no longer numbered versions.
How do I convert HTML to PDF?
FileChange renders the HTML in your browser and exports it as a PDF, preserving text, images, and layout. This is useful when you need a fixed-page, print-ready version of a web document.
Will my HTML file look the same on every device?
Not necessarily. HTML layout reflows to fit the screen, and external CSS or fonts can change the appearance. If you need a pixel-identical, paginated layout, convert to PDF instead.
Can I open an HTML file without internet access?
Yes. An HTML file opens directly in any browser offline. However, content that references external images, stylesheets, or scripts by URL will not load unless those resources are bundled in the file or stored locally alongside it.
Is it safe to open an HTML file from an unknown source?
Be cautious. HTML can include JavaScript that runs when the page loads, so an untrusted file could attempt unwanted actions in your browser. Open only files you trust, and sanitize any user-supplied HTML before displaying it on a website.