Manage Learn to apply best practices and optimize your operations.

Tip: Access HTML Files Using Edge

I hang out on TenForums.com, to keep up with Windows news, technical developments, and troubleshooting tips and techniques. I also do what I can to give back to the community by responding to posts and questions there. This morning, something popped up that I hadn’t faced before. A user asked “How do I access a local HTML file in Edge?” while observing that the program includes no built-in menu tools to open local files. I knew there had to be multiple ways to access HTML files using Edge, so I set about learning how to make this happen.

How to Access HTML Files Using Edge

My first instinct was to try the keyboard combination Ctrl-O to see if that shortcut for file open would work. Nope, no dice.

Next, I turned to the URL used for accessing anything in a web browser. For nearly all browsers, some variation on a URL that starts with the characters “file:” will do the trick. And in fact, that works for Edge too. As with Explorer (and Chrome, Firefox, and others) this general URL structuring technique provides immediate access to local files:

file:///C:/directory/filename.html

Where the following observations and substitutions apply:

  • file: is a protocol label (like http: for HTML documents) and must appear to access the local file system and structures
  • /// is a mandatory separator between the protocol label and the following file specification
  • C: is the drive specification for the volume in which the local file resides
  • /directory/ is the directory specification within which the local file may be found
  • filename.html is the filename for the HTML document (or other markup language file, such as XML, CSS, and so forth) that you wish to open in Edge

This real-world example actually reads file:///C:/Users/etitt/documents/02fig01.html fully expanded.

Of course, this also led me to think of another, perhaps faster or easier way to open such a document in Edge. One need only navigate to the file in File Explorer, right-click its listing entry, select “Open with…” from the resulting pop-up menu, and pick Edge as the application to use for that purpose. Done!

Another more permanent way to do this — unlikely in my case, because I don’t use Edge for everything on the Web — would be to change the application associated with HTML (.htm, .html, .mht, and other related file extensions) to Edge. You can do this using the Default Programs widget in Control Panel, if you were so inclined. My biggest issue with this is that there are a LOT of file extensions for which you’d need to make that association.

And finally, there are even more techniques for opening HTML files in Edge at the command line, or using C++. I’ll let the preceding links speak to those topics because those approaches don’t appeal to me much, if at all. (And the first of these other options is just a variation on the file: syntax item anyway). But as always, there are many ways to accomplish specific tasks in Windows, including opening web documents in the Edge browser. Enjoy!

Virtual Desktop
SearchWindowsServer
Close