Open html file in a browser in SharePoint 2013/2016

This SharePoint 2013 tutorial explains, how to view HTML file in the browser rather download in SharePoint 2013/2016. Recently I have created an HTML page and when I tried to browse the HTML file, it always asked me to download the HTML file rather open the HTML file in the browser in SharePoint 2013 or SharePoint 2016.

Open html file in browser in SharePoint 2013/2016

Actually forcing HTML files to download was an intentional decision taken by the SharePoint team of Microsoft. Since a user can upload an HTML page with some JavaScript code through JavaScript object model that would be executed by an administrator browsing to the page which may harm the server. So they forced HTML pages to download to avoid this security problem.

One way is you can rename the file from .html to .aspx, then it will open in the browser in SharePoint 2013/2016.

Before to go to the solution, you can create an HTML page through SharePoint designer 2013. Open your site in the SharePoint 2013 designer, then click on the Site Pages under Site Objects. Then from the Ribbon click on Page and then HTML. It will create the HTML page like below:

open html file in browser sharepoint 2013
open html file in browser sharepoint 2013

In SharePoint Central Administration -> Application Management -> Manage Web Applications > Then select the particular web application and then select General Settings from Ribbon as shown in the fig below:

Open html page in browser in SharePoint 2013

Then go to the Browser File Handling section, choose Permissive. And then click on OK as shown in the fig below:

Open html page in browser in SharePoint 2013 1

You may like following SharePoint tutorials:

Now try to browse any HTML file in SharePoint, it will not ask users to download the HTML file, rather will open in the HTML file in the browser in SharePoint 2013/2016. Hope this will be helpful.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

  • Hi i am jayprakash Birla
    here i have not find a solution for sharepoint Online
    is this setting how to open in sharepoint online
    is it possible to open html page open in Browser
    i have user aspx and there i am using multipal html url but it is not working.
    i am working in scrome player

  • >