Display an HTML file on Google Drive?

34,880

Solution 1

Ironically Google, a company built on html, still has no good solutions for handling .html files on Drive: I'm web developer! If you create a .html file within any text editor (Mac, Linux or MS) and save it with a .html extension (e.g. test.html), that file is now a Browser file, not a text or Doc file. G-Drive was created to be a cloud replacement for MS Office suite of products (Word, Excel, and so forth). It will even save a .txt (or text) file, and display it back as such.

However, a file dropped in Drive (via the Chrome browser) with a .html extension; if you simply click on it, it will be opened by/in Docs, and displayed therein as a web page (and poorly too, since it cannot connect to the styling of the .css file). If you right-click on it, and select "display", it will give a similar display only without opening it in Docs. If you right-click and select "download" it will download in .doc format. Yes, worthless! I copy the html, code and all from the file on my PC, and paste it into a blank Doc file, which is OK for a backup of that file, plus it will spell-check and all, but it is not an easy way to cloud save or sync. And, it cannot open the browser to view it, because it is internal to (or already inside of) the browser. The only accurate way to preview a .html file, is for the file to be external to a browser (any web browser), and then opened inside or with that browser.

To repeat: If you simply click on it, it will be opened by/in Docs, and displayed therein as a web page (and poorly too, since it cannot connect to the styling of the .css file). If you right-click on it, and select "display", it will give a similar display only without opening it in Docs.

Solution 2

I am not exactly sure what you mean by display. If you just want to preview a file in google drive open it and see its contents then the only types are

PDF, Microsoft Office file, audio file, or photo.

Just double click your html file you can preview it in drive.

please see View and open files

If you are actually talking about web hosting a html file then. Hosting of HTML files from within Google drive was Deprecating in August of 2015 and shut down completely in August of 2016 so you can no longer host HTML files directly via Google drive Please see Deprecating web hosting support in Google Drive

Alternative would be to use Google Domains to host a site that way this option is not free as far as I know.

Share:
34,880
Blax
Author by

Blax

Updated on July 09, 2022

Comments

  • Blax
    Blax almost 2 years

    How can I preview an HTML file on Google Drive? I did a bit of research and it seems hosting HTML has been deprecated by Google in 2016. I tried to open the direct link of the HTML file but it downloads it and doesn't display it. Any workaround ? Thanks :D

  • Blax
    Blax over 7 years
    Thanks for answering ! I would like to be able to preview an HTML file right in Google Drive in fact.
  • Martin van Houte
    Martin van Houte over 7 years
    Alternatively you can also host on Github Pages for free.
  • DaImTo
    DaImTo over 7 years
    Double click on the html file in your google drive you can preview them its just a text file really.
  • Blax
    Blax over 7 years
    @DaImTo I would like to preview the HTML website, not the HTML text ;)
  • DaImTo
    DaImTo over 7 years
    That is option number two is deprecated you cant do that.
  • Blax
    Blax over 7 years
    @MartinvanHoute Is it possible to live collaborate in Github?
  • Blax
    Blax over 7 years
    @DaImTo Even with extensions ?
  • Blax
    Blax over 7 years
    @DaImTo Oh yes that's right I forgot ;) Then is there any URL scheme workaround?
  • Martin van Houte
    Martin van Houte over 7 years
    @Blaxou You can have multiple users in a Github repository, so in a way you can 'live collaborate'.
  • Alberto Martinez
    Alberto Martinez over 6 years
    Paul, it seems that you have created two different accounts by mistake, so can't edit directly you own posts, see I accidentally created two accounts; how do I merge them?
  • Jorge Costa
    Jorge Costa about 6 years
    yep, worthless.
  • Noctis Skytower
    Noctis Skytower over 5 years
    Is it possible to view a rendered HTML file in Google Drive?
  • DaImTo
    DaImTo over 5 years
    @NoctisSkytower no