How to open HTML pages of a document library in sharepoint in browser instead of downloading?

In SharePoint on-premises, we can set Browser File Handling to Permissive for users to open html files directly in the browser. But in SharePoint Online, there is no options for this.


Rename the files, replace .html with .aspx. SharePoint Online will open .aspx in browser.