You get a .html file by email, or you find one in Files after unzipping an archive. You tap it, and depending on the case nothing happens, it opens in a preview showing raw text, or Safari displays it with no formatting at all. The file is not broken: iOS simply does not know what to do with a web page that lives on the device.
A browser is built to fetch pages from a server. When the page is already here, on your device, two problems appear.
The first is that almost no website is a single file. It is a folder: the page calls a stylesheet, an images directory, sometimes JavaScript, and points at other pages. Opening the lone .html file is like reading a book where the text was kept and the layout thrown away.
The second is that the iOS sandbox isolates apps. An app that opens your file does not necessarily have permission to read the surrounding folder, so neighbouring assets stay out of reach even when they sit right next to it.
Fast, already installed, nothing to do. It does treat the file in isolation though: missing styles, missing images, internal links that lead nowhere. Good enough to check a file contains something, not to read it.
Turning the page into a PDF from a computer before transferring works, and gives a perfectly readable document on iPhone. But you lose navigation between pages, and you have to redo it on every update. That is a solution for a frozen document, not for a documentation set.
Publishing the site somewhere and browsing it with Safari gives a perfect result. It is also the only case where your content leaves your device, which becomes a problem as soon as it is client material or unreleased work. We cover that trade-off in reading a local site without running a web server.
The last option is an app built for it, one that opens the whole folder and resolves relative paths the way a browser would.
Pagira opens a complete site folder or a single file, on iPhone and on iPad.
If you have the complete folder, open the folder rather than the file: that is what lets stylesheets and images be found. The detail is on the open full local websites page.
A site often arrives compressed. Unzip the archive in Files, which iOS does natively with a long press, then open the resulting folder. Opening the .html straight from the archive will never render correctly, since the neighbouring files are not extracted yet.
Many folders mix HTML pages and PDF documents, with links from one to the other. A link to a PDF opens in the same app, and a swipe brings you back to the page you came from. See the built-in PDF reader.
Because the stylesheet was not found. It almost always lives in a separate file, often in a subfolder. Open the whole folder rather than the single file.
Yes. Interactive pages behave as expected, which matters for documentation with dynamic navigation or a page that renders something on screen. See CSS and JavaScript support.
No. Everything runs on your device, with no server and no account. That is the fundamental difference with an online service that displays your pages.
Yes, through the share sheet. If the attachment is an archive, save it to Files first and unzip it.
The steps are identical. One app covers iPhone and iPad, with an interface suited to both.