How to Edit HTML Source on a Modern SharePoint Page
Question details
The user wants to edit the HTML source code of a modern SharePoint page.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Customizing the content or layout of a modern SharePoint site page.
- Observed behavior
- Modern pages use predefined components and do not provide a built-in HTML source editor.
Confirm that the page is a modern SharePoint page and that you have permission to edit it. Identify whether you need to change page content or add custom functionality, since the supported approach differs.
Customize the page with modern SharePoint web parts
Use built-in web parts to change content and layout without editing the page's HTML source.
Open the modern SharePoint page and select Edit at the top of the page.
Select an existing web part to edit it, or select the plus button in a section to add a web part such as Text, Image, or Embed.
Select Publish or Republish when you are ready to make the changes visible.
Use SharePoint Framework for advanced customization
Use a supported development approach when built-in web parts cannot provide the required functionality.
Create and Edit Office Documents with WPS Office
WPS Office is a free, lightweight alternative for editing documents, spreadsheets, and presentations in a familiar interface. Its Microsoft Office format support makes it easy to move existing files into WPS. It does not edit the HTML source of a modern SharePoint page.

Frequently Asked Questions
Can I open the HTML source of a modern SharePoint page?
No. Modern SharePoint pages do not provide a built-in option to edit their raw HTML source. Select Edit on the page to work with its supported sections and web parts.
Can I add custom functionality to a modern page?
Yes. A developer can create a custom SharePoint Framework web part, and an administrator can deploy it through an app catalog. Once available, add it from the plus button while editing the page.
Can I paste arbitrary HTML into the Embed web part?
The Embed web part is intended for supported embedded content, not unrestricted HTML editing. What you can embed depends on SharePoint's embedding rules and your organization's policies.
Would a classic SharePoint page give me more editing options?
Classic pages can offer different customization options, depending on the site configuration and permissions. Check with your SharePoint administrator whether a classic page is available and suitable; switching experiences does not directly turn a modern page into an editable HTML page.




