There are 2 ways for opening .html files in Google chrome.

Way 1 :

Right click on the .html file and select open with Google chrome.

Way 2 :

  1. Open Google Chrome
  2. Press ctrl + o
  3. A window opens
  4. Navigate to your destination folder and click on your .html file

That's it. There you go.

Hope This is helpful.

Answer from Areg Nikoghosyan on Stack Overflow
🌐
Reddit
reddit.com › r/androidquestions › open a local html file on a phone?
r/AndroidQuestions on Reddit: Open a local HTML file on a phone?
September 9, 2024 -

I considered it a no-brainer. I was wrong.

I wanted to take along some files to read when I'm out of network reach or in flight mode. The files happen to be quite plain HTML files, no script, just a CSS file defining the simple layout, and that's it. So I copied the HTML and the CSS files onto my phone and tried to open them.

First attempt was from a file manager. It told me that it no idea what to do with an HTML file. I then tried to look for an "open file" entry in Chrome. Nope. Same in Firefox. Then I tried to force-open the files by using a file:///path/to/file style URL - and it actually submitted the whole string to Google as a search string, as if Chrome (and Firefox) had been lobotomized of the file: protocol.

Now I'm at a loss - is there no way to open a simple HTML file on an Android 13 phone?

🌐
Tiiny Host
tiiny.host › blog › how-to-open-html-file-in-chrome
How to Open an HTML File in Google Chrome – Tiiny Host Blog
2 weeks ago - The file should now open in the Chrome app. To view the source code of any web page or HTML file you have open in Chrome, just right click anywhere on the page and click the View Page Source button.
🌐
Quora
quora.com › How-can-I-view-a-webpages-source-code-in-Google-Chrome-mobile-version
How to view a webpage's source code in Google Chrome mobile version - Quora
To view a page’s source on mobile Chrome, you could either use a tool like this one: Mobile HTML Source Viewer, or you can use the view-source: prefix, and instead of tapping on the first option below the URL bar with the magnifying class, ...
🌐
Indeed
indeed.com › career guide › career development › how to view html using different internet browsers
How To View HTML Source Code Using Different Browsers
First, open the webpage that you want to inspect using your Android device and the Chrome browser. Tap on the address bar once and move the cursor to the beginning of the URL listed. Add [view-source:] to the beginning of the page.
🌐
Computer Hope
computerhope.com › issues › ch000746.htm
How to View a Web Page's HTML Source Code
This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real-time. Open the Google Chrome browser on your Android phone or tablet.
🌐
Reddit
reddit.com › r/vscode › how can i open html file from vscode on chrome
r/vscode on Reddit: How can i open html file from Vscode on Chrome
April 9, 2023 -

I use Mac and not familiar with Vscode I want to open some html file in Chrome so far I try two methods :

First , click Run and Debug, html opens to safari which i dont want that . Second , I choose launch Chrome selection in nav bar , it launchs Chrome page but it’s an error page.

After thet I open html by using terminal by using open command : open index.html the files opens in safari

How can I fix that ? Thanks in advance .

Find elsewhere
🌐
Quora
quora.com › How-do-I-see-HTML-code-in-Chrome
How to see HTML code in Chrome - Quora
· · Since the other answers are text-only they’re getting collapsed so. ... Right-click the file. Go to Open With, and select the program ... Since the other answers are text-only they’re getting collapsed so.
🌐
Brainly
brainly.com › computers and technology › high school › how can i view html code in chrome on a mobile device?
[FREE] How can I view HTML code in Chrome on a mobile device? - brainly.com
November 27, 2023 - In Chrome mobile, view HTML code by prepending 'view-source:' to the website's URL. This displays the source code as plain text, but lacks the functionality of desktop Developer Tools.
🌐
Google Support
support.google.com › chrome › thread › 3131802
How Open html files - Google Chrome Community
March 27, 2019 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience ·
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-access-an-html-document-in-a-browser
How to access an HTML document in a browser ? - GeeksforGeeks
June 1, 2022 - Nonetheless, you can utilize any basic content tool to open and peruse it as text. Whenever you need to see what the website page resembles, you want to run this HTML record utilizing an internet browser. Google Chrome perceives HTML, and you can utilize it to open any document with an ".html" expansion.
Top answer
1 of 3
10

You have 2 options:

  • You can use a local web server in your Android phone itself. There are many server apps out there in the Play Store, one such app is Simple HTTP Server.

  • You can put your documents into the folder Android/data/com.android.chrome/files/Download/ in the internal storage. It's absolute path is /storage/emulated/0/Android/data/com.android.chrome/files/Download/ or /sdcard/Android/data/com.android.chrome/files/Download/. This is the location where Chrome stores any downloaded files and therefore, this the only location where Chrome can access the files. But remember, uninstalling Chrome will delete this directory.

2 of 3
6

For Android 11 [One UI 3.1]

Browsing local files (in internal storage space) in Chrome using file:///sdcard/ or file://localhost/sdcard/, one can notice that only media files and subdirectories (if any) are listed in almost every folder except the "Download" folder (but not in its subfolders=subdirs).

This means that on Android 11, the folder from which Chrome can read local (m)HTML is /Download folder, not Android/data/com.android.chrome/files/Download in internal or external storage space like in Android 10.

NOTE: on my Samsung devices, downloads onto internal storage were saved into /Download folder in all versions of Android (9, 10, 11), but downloads on an external SD card changed their folder from /storage/emulated/exSD_CARD/Android/data/com.android.chrome/files/Download in Android 10 to /storage/emulated/exSD_CARD/Download in Android 11, where exSD_CARD is the device's label for external SD card (0123-4567 or 9C33-6BBD in my devices)

Thus, (m)HTML files saved into /Download folder with Chrome (with .mhtml extension from older times or with manually added extension by renaming saved mhtml files without extension - from certain time Chrome stopped to append .mhtml extension to saved mhtml files :) on my devices, I guess from upgrading to Android 10)

This did not work for the mhtml files which have been moved to other folders and then returned to /Download folder. (And because of collecting saved mhtml files in many different folders, I have many mhtml files which are necessary to copy/move back to /Download folder prior to opening but they still cannot be opened)

Notes about opening mhtml files

I need to use Total Commander's "Open with" functionality with file://url option checked, then choose Chrome in order to open (mhtml) file with Chrome (with file://url checked, the Chrome is in the list to choose from, with file://url option unchecked, it is not listed in the list) or to browse local files in internal storage directly in Chrome (file manager My Files provided with the device was unusable to choose mhtml files to be opened with Chrome)

(mhtml) files from /Download folder opened in this way are opened as offline versions of downloaded web pages - but only if the file was not moved and returned back to /Download folder, otherwise you get Access Denied message. Also, opening (mhtml) files in this way using Total Commander, but from other folders than /Download folder, leads to Access Denied message

Opening mhtml files from any folder using Total Commander, but with file://url option unchecked (in this case, the Chrome is not in 1st list, so you need to choose "Open with *" option with folder icon from the list and subsequently choose Chrome from next list) behaves differently. Opening in such a way leads not to successful opening or Access Denied message but to Save as Dialog Form in which one can choose also if the resaved mhtml file should be saved to internal storage or external SD card (if present). In this way, resaved mhtml files in /Download folder (on internal or external storage space) can be now opened using Total Commander "Open with" dialog with checked file://url option.


Still, there exists a way of opening the (m)HTML files with Chrome

  • without other browsers/viewer
  • without rooting the Android device

but maybe only until the next update :)

Top answer
1 of 5
3

As a recent Mac OS adopter I too ran into this. For me, it was due to using TextEdit, and expecting it to act like Notepad.

When you save a .html file in TextEdit, it encodes the HTML and wraps it for you, without any notification.

Viewing source, or opening the file in vim or more in terminal shows what has been applied:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1265">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica; min-height: 16.0px}
  </style>
</head>
<body>
<p class="p1">&lt;!DOCTYPE html&gt;</p>
<p class="p1">&lt;html&gt;</p>
<p class="p1">&lt;head&gt;</p>
<p class="p1">&lt;title&gt;Test&lt;/title&gt;</p>
<p class="p1">&lt;/head&gt;</p>
<p class="p1">&lt;body&gt;</p>
<p class="p2"><br></p>
<p class="p1">&lt;/body&gt;</p>
<p class="p1">&lt;/html&gt;</p>
</body>
</html>
2 of 5
0

I copied and pasted your code into textmate saved the file as test.html and doubled clicked on it.

It worked perfectly. It seems like a browser issue, have you tried reinstalling them. How about try it on another computer? Is the file name end with .html?

how about

<html>
<head> 
    <title>Hi</title>
</head>

<body>
    <p>Are you working?</p>
</body>

</html>

does that work?

🌐
Google Support
support.google.com › chrome › thread › 110077650 › how-do-i-set-an-html-file-to-open-to-in-specific-non-default-chrome-profile
How do I set an HTML file to open to in specific non-default chrome profile. - Google Chrome Community
May 16, 2021 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
Google Support
support.google.com › surveys › answer › 6172725
View source code - Google Surveys Help
To view the HTML of your webpage (also known as the "source code"), first open your web browser. Then, visit the premium content page where you'd like to show surveys. Once you're there, please follow
🌐
Alphr
alphr.com › home › how to view html code in chrome
How To View HTML Code in Chrome
February 13, 2023 - Open Google Chrome and navigate to the web page you want to inspect. Press Ctrl + Shift + I on your keyboard. The Developer Tools pane will open in a dock alongside the webpage you’re viewing.
🌐
Trevor Fox
trevorfox.com › tools › source-viewer
HTML Source Viewer (view-source: on Mobile) • Trevor Fox
February 3, 2026 - View a website’s HTML source code on mobile devices, including Chrome on Android and iOS. Just paste a URL to view the page source.