The field guide

How to open and preview an HTML file

Open a saved HTML page in your browser, check it at phone width, and find out why images or interactions might be missing.

Open a file on your computer

A file ending in .html or .htm is a web page. Double-click it to open it in your default browser, or drag it into a browser window. If you see code instead of a page, check that the file is saved as plain text with an .html extension, not .html.txt. A page opened this way has a file:// address, which only works on that device.

Use the viewer to compare screen sizes

In Tunly’s HTML viewer, choose the HTML file or paste the full document. Select Preview HTML, then switch between desktop and phone widths. The viewer does not upload the file. Phone width is a layout check inside your current browser; it does not reproduce every mobile browser behavior.

Understand missing images and styles

A self-contained file includes styles in a style element, scripts in a script element, and any needed images as data URLs. Relative paths such as images/chart.png refer to other files and will not be available when you choose only the HTML file. Remote resources are blocked in Tunly’s local viewer. Keep the folder together and use a local development server when a page depends on multiple files or module imports.

Test interactions deliberately

Reading an unfamiliar HTML file is different from running its JavaScript. Tunly’s viewer starts with scripts disabled. If you trust the file, enable interactions and preview it again to test tabs or a calculator. The sandbox restricts network connections, storage, popups and navigation, so a page that relies on those capabilities may behave differently from a normally hosted site.

Send a page, not a local file address

To let someone else open your work, publish it to a web address or send all of the files it needs. A file:// address or a blob: preview address is not a shareable public link. The HTML-to-link guide explains the publishing step, access choices and how to check the result.