THE GITHTML FIELD GUIDE
How to open an HTML file on iPhone or iPad
On iPhone and iPad, an .html file in the Files app is not guaranteed a full rendered view: Apple documents Quick Look previews for images and PDFs, and linked stylesheets, images, and scripts generally will not load from a local file. For dependable reading, open the page from a URL or use an HTML reader such as gitHtml for repository documents.
Start with what Apple documents
Apple's iPhone User Guide explains how to preview files in Files with Quick Look and how to pick an app with Open With, but it describes previews for images and PDFs specifically. Apple's Quick Look developer documentation also notes that supported file types can change between releases. In other words, an HTML preview may appear, but it is not a promised reading experience.
User reports describe Files showing the text and inline styles of a simple HTML file while relative images fail to load. That matches how a single file opened outside a website behaves: there is no folder context or server to resolve neighboring resources.
Try the built-in options first
If you have a single, self-contained file, the Files app may be enough for a quick look. Test it with the document you actually need rather than assuming. If the page looks unstyled or has empty boxes where diagrams should be, the file depends on resources that are not available in that context.
- Save or move the .html file into Files, either On My iPhone or a cloud provider folder.
- Touch and hold the file, then choose Open With to see which installed apps accept it.
- Check a section near the end and any images; missing pictures indicate relative or remote dependencies.
- If you need to set a preferred app, use Get Info and Always Open With where available.
When the file lives in a GitHub repository
Downloading repository files one at a time to the Files app quickly becomes tedious, and GitHub's own mobile file view shows HTML as source. gitHtml connects to your GitHub account, indexes the .html files in repositories you choose, and renders them with WebKit. JavaScript and remote resources are off by default, so a document that keeps its essential content and CSS in the file is the one that reads best.
For a whole website with many pages, routing, and search, a hosted copy viewed in Safari is the right tool. A reader is designed for documents: reports, runbooks, design reviews, and generated summaries that make sense as standalone pages.
Make HTML that opens well on a phone
Authors can remove most iOS reading problems before the file leaves the computer. Add a viewport meta tag so text is not shrunk to a desktop canvas, put CSS in a style element, embed small images as data URIs or replace decorative ones, and wrap wide tables and code in containers that scroll horizontally on their own.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Release review</title>
<style>
body { font: 17px/1.55 -apple-system, system-ui, sans-serif; max-width: 42rem; margin: 0 auto; padding: 1rem; }
pre, .table-wrap { overflow-x: auto; }
</style>
</head>
<body>
<h1>Release review</h1>
<p>Summary first, details below.</p>
</body>
</html>Sources and further reading
- Apple iPhone User Guide: Find and view files in Files
- Apple Developer: Quick Look
- MDN: viewport meta tag
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.