Create, upload, edit, and publish HTML pages in SharePoint
Updated Oct 22, 2026
Version 2.0If you disable HTML pages on your site, the "HTML page" option will not show in the +New menu. Please refer to the support documentation for more details on that setting in the site pages library.
https://support.microsoft.com/en-us/sharepoint/create-edit-publish-html-pages
I spent the last 4 hours manually disabling HTML Pages across all our sites, but I am concerned that the location Microsoft has chosen to store this setting is not appropriate. Site Owners will see it, toggle it back on, and I'll spend a lot of time going back and forth with them. Can we get it moved from the Site Pages library into Site Pages Library Settings? Is there a PowerShell script we can run to hide the UI? Or a script we can use to see if a site has toggled it back on? Please advise!
Thank you for the feedback. At this time, there are currently no plans to move the setting location. We do not have a Microsoft-provided PowerShell script for hiding the UI or automatically checking if the setting is toggled. That said, if you list all the features for a given site, you will see this listed if "Allow HTML files" is enabled for a given site:
Feature Name: HtmlPages
Feature ID: b35f1374-dbc0-454a-973c-2a0ab62d5afa
If you disable the setting for a site, the user should not be able to add HTML to the pages library. This does not impact someone's ability to add HTML to the document library.
Thanks. We created a Power Automate Flow that scans our sites and notifies us if the "HTMLPages" status changes.
Unfortunately, even if you disable it across your tenant, users can still create HTML pages. All the setting does is hide the Create HTML page button. However, users can still upload HTML files to the Pages library or simply ask Copilot to create an HTML page and it will. Effectively, Microsoft have implemented something that is all smoke and mirrors - there is currently ZERO way to disable HTML pages.
We’re generally good with HTML on our intranet. We’ve developed a process that includes specific guidelines, required testing and certification, and a Copilot Agent that helps employees build branded experiences the right way.
Additionally, we ask that employees store the final approved experiences in Site Assets and register them with us. Our goal is to encourage employees to be more strategic and deliberate in their creations and to be accountable when they stop working or become outdated. We definitely want to avoid having random HTML files, folders, and supporting assets dumped directly into the Site Pages library.
The challenge for us with + New > HTML Page is that it creates an easy path around all our governance. The button being right there in the Site Pages library makes it easy for Site Owners to toggle it on/off, and at our scale, all this makes HTML much harder to govern.