.html File Extension
.html file is, which apps open HTML pages, how Poly supports them, and how to convert or share them safely. File extension details for .html
Full Support| File type | HyperText Markup Language document |
|---|---|
| MIME type | |
| Encoding | Text, normally Unicode UTF-8, containing HTML markup |
| Operating systems | Windows, macOS, Linux, iOS, Android |
| Opens with | Google Chrome, Microsoft Edge, Mozilla Firefox, Safari, Visual Studio Code |
| Poly support | Yes. Poly provides rich support for HTML documents. |
| Indexed by Poly | Yes. Poly indexes the full source for exact and semantic search. |
| Preview in Poly | Yes. HTML files open as rendered pages in Poly. |
| Poly agent | Yes. The Poly agent can read the source and reason about its text and structure. |
What kind of file is an .html?
An .html file is a HyperText Markup Language document. Its text markup describes headings, paragraphs, links, images, forms, scripts, and other parts of a web page. The registered text/html MIME type commonly uses both .html and .htm. The two suffixes represent the same format.1
HTML has no unique magic bytes. A document can begin with <!doctype html>, whitespace, a comment, or other permitted content. Inspect the source and supplied MIME type if the filename is misleading.1
page.htm to page.html changes only the filename. Renaming a PDF, image, or unrelated text file to .html does not convert it into a web page.How do I open an .html on my computer?
Double-click an HTML file to open it in your default browser. Chrome, Edge, Firefox, and Safari can render local HTML on Windows, macOS, and Linux. Mobile browsers can display it too. Use a source editor such as Visual Studio Code when you need to inspect or change the markup.
A saved page may look incomplete if it depends on CSS, JavaScript, fonts, images, or data that were not saved beside it. Relative URLs resolve from the file's location, so moving the page without its companion folders can break images and styling.2
Treat an unfamiliar HTML file like an unfamiliar website. It can run scripts, submit forms, redirect the browser, or request remote resources. Open it with current software, do not enter credentials into an untrusted page, and inspect suspicious source first.1
Poly support for .html
Poly recognizes .html filenames and provides page thumbnails plus a rendered preview. It also indexes the full stored source for exact and semantic search, including readable text, tags, links, and attributes.
The Poly agent can reason about the document's content and structure. The rendered result and source answer different questions: the preview shows what the file can display with its available resources, while source search still finds markup or text when a dependency is missing. Poly does not automatically collect every linked resource or turn one file into a complete website capture.
History of .html
Tim Berners-Lee wrote the first WorldWideWeb browser and editor in 1990, then released it with the first web server in 1991. He also published the early HTML, HTTP, and web-identifier specifications so others could build compatible tools.3 The IETF documented established HTML practice as HTML 2.0 in November 1995.4
HTML later passed through numbered W3C recommendations. Today, the continuously maintained HTML Standard defines both authoring rules and the error recovery browsers use for imperfect pages.5 The .html suffix became the natural descriptive spelling, while the three-character .htm alternative remains for compatibility with older tools and conventions.
Working with .html and alternatives
Save modern authored HTML as UTF-8. When declaring the encoding inside the file, place the complete <meta charset="utf-8"> declaration within the first 1,024 bytes.6
| Need | Practical choice | Main tradeoff |
|---|---|---|
| Editable, responsive web page | .html | May depend on external resources |
| Fixed layout for sharing or printing | Loses most interactivity | |
| Readable content for editing | Markdown or plain text | Loses page structure and styling |
| Page plus its dependencies | Web archive or complete site folder | Less convenient than one file |
Printing an HTML page to PDF captures a particular rendering. Converting it to Markdown or plain text preserves much of the prose but usually drops scripts, forms, layout, and attributes. Dynamic sites may also depend on authentication and live data, so no static export necessarily preserves the full application.
Footnotes
- WHATWG. HTML Standard:
text/htmlMedia Type Registration. Lists the common extensions, states that HTML has no unique magic number, and documents security considerations. ↩ ↩2 ↩3 - MDN Web Docs. Dealing with Files. Describes opening local HTML files and resolving relative file paths. ↩
- Berners-Lee, T. The World Wide Web: A Very Short Personal History. World Wide Web Consortium. ↩
- Berners-Lee, T., and D. Connolly. RFC 1866: Hypertext Markup Language - 2.0. Internet Engineering Task Force, November 1995. ↩
- WHATWG. HTML Standard. The living standard defines HTML syntax, elements, APIs, and browser processing. ↩
- WHATWG. HTML Standard: Specifying the Document's Character Encoding. Requires UTF-8 for authored documents and defines placement of an in-document encoding declaration. ↩