I have a SharePoint Developers account and I think its cool that Microsoft allows you to  have it for free to practice your skills. During some testing, I uploaded a .aspx file into a site under the SitePages/ folder and whenever I tried to open it with the browser, it would not allow me, instead it would force download.

This short tutorial will show you the steps to configure you SharePoint Online Site to allow to render or run .aspx files instead of download.

1. Access your admin page through settings or through the url: https://[TENAT]-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx

2. Scroll down and look for the Custom Script Section, you will find the following description below and select the option to Allow users to run custom script on personal sites

Custom Script
Control whether users can run custom script on personal sites and self-service created sites.  Note: changes to this setting might take up to 24 hours to take effect.

For more information, see https://go.microsoft.com/fwlink/?LinkId=397546    
       
Prevent users from running custom script on personal sites
Allow users to run custom script on personal sites

Prevent users from running custom script on self-service created sites
Allow users to run custom script on self-service created sites

NOTE: The changes may take up to 24 hours to take affect, check regularly.

If you prefer, you can use PNP Powershell using the following command:

$credentials = get-credentials
Connect-PnPOnline -url https://[TENANT].sharepoint.com/sites/[SITENAME] -Credentials $credential
Connect-PnPOnline -PnPManagementShell -Url https://[TENANT].sharepoint.com/
Set-PnPSite https://[TENANT].sharepoint.com/sites/[SITENAME] -NoScriptSite $false

Thats it, now you can render the .aspx files, but not the .html files you still cannot, sorry.

SHAREPOINT FILE EXPLORER ERROR:

I was also getting the following message when I was using File Explorer on the SharePoint

Address: https://[TENANT].sharepoint.com/sites/DCOps/SitePages

Error 0x800700E0: Access Denied. 
Before opening files in this location,
you must first add the website to your trusted sites list,
browser to the web site, and select the option to login automatically.

1. Set trusted site: In Internet Explorer, go to Internet Options > Security >  Trusted Sites > Click on the Sites button > add the following:

https://*.microsoft.com

https://*.microsoftonline.com

https://*.sharepoint.com

NOTE: You can open trusted sites with the following methods:

1. Internet Explorer Browser Internet Options > Security >  Trusted Sites >

2. Control Panel: Enter the following in your File Explorer: Control Panel\All Control Panel Items and select Internet Options