SharePoint HTML pages are now generally available, so I tested what they can and cannot do, with Copilot and without it. This article lists the results and gives you samples and prompts you can reuse.
Here is an intranet home page built as one HTML file:

An HTML page can handle a simple departmental home page. Live pictures, audiences, library commands and very large lists are the main limits. Part 3 compares each common web part with its HTML version.
In August 2026 I wrote SharePoint HTML pages, what they can and cannot do, weeks before the feature reached General Availability. It is now generally available, so I ran a new round of experiments to see what changed. That first article explains how HTML pages work under the hood. This article shows what you can and cannot do with them today, with Copilot and without it, and gives you ready-to-use samples and prompts.
Yaroslav Pentsarskyy published a very good take in the meantime: Copilot generated pages: Where They Actually Fit.
| Takeaway | |
|---|---|
| ✅ | An HTML page saved in the Site Pages library now looks like any other SharePoint page, with the site’s header and navigation around it. In any other library, it opens in the HTML Viewer, like a Word or PDF file. |
| ✅ | An HTML page can be the site’s home page. Select it in Site Pages and choose Make homepage. The site’s address then opens the HTML page, with the site header and navigation around it. |
| ✅ | Pages can show charts, flowcharts, 3D models and Microsoft-style controls, using five code libraries that SharePoint provides. One line in the HTML file, the library tag, is enough to load them. |
| ✅ | Pages are not limited to Microsoft’s five libraries. Upload any other library’s .js file, such as D3, to Site Assets and ask Copilot to embed its complete, unmodified code in the page. Or include the full library code inside a <script> tag in the HTML file yourself. |
| ✅ | Pages can show live data from a SharePoint list, a CSV file or an Excel workbook. The data is fetched each time the page opens. A CSV or Excel file works even when it sits in a folder. |
| ✅ | A page can check a file the user picks or drags onto it, such as a CSV file before it is imported somewhere. The file is read in the browser and is not uploaded. |
| ✅ | You do not need Copilot. Claude, ChatGPT or any other AI tool can write the page, and you upload it to Site Pages. This article includes ready-to-paste instructions for them. For a live data page, the AI also needs the IDs of your list or file, and this article shows how to get them. |
| ✅ | One CSS file can style many pages. Keep brand.css next to your HTML pages on your PC, link it from each page, and upload the folder with Upload HTML folder. SharePoint copies the styles into every page. To change the design, edit the file and upload the folder again: the pages are replaced, not duplicated. |
| ✅ | Content approval works. With approval turned on in Site Pages, an HTML page gets Submit for approval, waits as Pending, and is published when an approver approves it, the same as a modern page. No Power Automate flow is needed. |
| ✅ | For the Microsoft 365 look, ask Copilot to build the page from the built-in Fluent UI components. A short prompt is enough, with no design rules to paste. |
| ✅ | Copilot can copy the design of an existing HTML page or read your styles from a file in Site Assets. The new page matches exactly. |
| ✅ | Pages can show pictures stored anywhere in your organization’s SharePoint, as long as the <img> tags are written in the HTML file. |
| ✅ | Pages can link to outside websites, once a site owner adds those websites to an allowed list in the site settings. |
| ✅ | Pages can follow the user’s own dark mode and Windows animation settings, if the page’s CSS is written to support them. |
| ✅ | Inside the Copilot chat, an HTML preview can show you a small form, such as chart type and colors, and turn your answers into the follow-up prompt. This only works while you are in the Copilot chat on a draft page. |
| Takeaway | |
|---|---|
| ❌ | An HTML page cannot load a .css or .js file, not from the internet and not from your own site. Styles and code work only when they are written inside the page. Pictures from your tenant are the exception: they do load. |
| ❌ | The Upload HTML folder feature is a nice addition, but it is not as powerful as it may seem. It copies the content of your .css files into a <style> tag inside each HTML file, saves your pictures in Site Assets, and keeps links between pages working. Your .js files are saved in Site Assets too, but they never run, so they are just unused copies. Before you upload, move the code from each .js file into a <script> tag inside the HTML page that uses it. If the pages are already uploaded, you can ask Copilot to copy the code of the .js files into each HTML page. |
| ❌ | An HTML page cannot be posted as news, and it does not show up in the News web part. |
| ❌ | Folders in Site Pages are not created for you. When I asked Copilot to save a page into a folder, it saved the page at the top level of Site Pages, and Upload HTML folder did the same with every page. You can still move pages into folders yourself. A page that lists the files of a library shows only the files at the top level, not the files in subfolders. |
| ❌ | A page cannot remember anything about a user. Every visit starts fresh. |
| ❌ | Buttons that download a file, print the page, open a pop-up or submit a form do nothing. |
| ❌ | Pictures from outside your organization, frames with YouTube videos or maps, and “Email us” links do not work. |
| ❌ | A video does not play inside the page. Users click it, and it opens in SharePoint’s video player. |
| ❌ | An HTML file can be at most 10 MB. Upload HTML page rejects larger files. If you upload a larger file another way, for example with PowerShell, SharePoint does not open it as a page. The browser downloads it instead. |
| Takeaway | |
|---|---|
| ⚠️ | If you change the site’s colors later, existing HTML pages keep the old colors. |
| ⚠️ | The WYSIWYG page editor might break a page that uses JavaScript. On two chart pages, it saved a copy of the drawn charts into the file, so the charts showed twice. On another page, my text changes were saved, but a script put the old numbers back every time the page opened. This should be fixable with a follow-up Copilot prompt, but Copilot or the code editor is the safer choice for these pages. |
| ⚠️ | When Copilot adds a picture, it copies the picture into the HTML file as base64. The page does not see later changes to the original, and every picture makes the file bigger. |
| ⚠️ | Copilot rejects long prompts, roughly more than two pages of text. Put long instructions or styles in a file in Site Assets and ask Copilot to read it. |
| ⚠️ | The five Microsoft libraries come in fixed versions, and two of them are six years old: Chart.js 2.9.4 and React 17.0.1. If you build a page with Claude or ChatGPT, tell it the exact versions. |
| ⚠️ | Live data has hard limits. A page with more than 32 data sources gets no data at all, and a data file over 50 MB arrives cut off after its first 5 MB, with a misleading warning about a sensitivity label. |
| ⚠️ | SharePoint search finds only the text written in the HTML file. Text, charts and data that a script adds are invisible to SharePoint search. |
I uploaded a number of HTML files myself, and Copilot built the rest. After each test I downloaded and inspected the saved files. All tests ran from 28 to 30 October 2026.
| Area | August 2026 | October 2026 |
|---|---|---|
| HTML files in Site Pages | Opened in the HTML Viewer | Open as pages, much closer to modern SharePoint pages, with the site header, navigation, Share and Edit |
| HTML files in other libraries | Opened in the HTML Viewer | Open in the HTML Viewer, like Word or PDF files |
| Built-in libraries | Listed by Microsoft, but did not load | All five load and run |
| A link to another page in the same tenant | Always opened a new browser tab | Opens in the same tab |
| A link to an external website | Blocked | Opens in a new tab if the domain is on the site’s allowed list |
| Images | Only from the same site | From any site in the tenant |
| Ways to create a page | Copilot, or upload a file to a library | Also + New > HTML page, Upload HTML page and Upload HTML folder |
| Editing | Copilot only | Copilot, plus the WYSIWYG page editor |
| Content type | None | A new “Html Page” content type in the Site Pages library |
Any page on the site now has + New > HTML page. It opens a screen where you describe the page, or upload your own HTML file.
While Copilot works, you see an empty draft with gray placeholder blocks. When it finishes, it saves the page under the name you asked for.
You can now edit text directly on the page. Click any element and a toolbar appears with fonts, colors, links, lists, images and tables.
The published page sits inside the site, with the site header, navigation, Analytics, Share and Edit. In August 2026 it opened in the HTML Viewer. Now, as long as it is stored in Site Pages, it opens as a page that is much closer to a modern SharePoint page.
If you ask Copilot to save a page to a specific library, it saves the page there. I tested Documents, Site Assets and a custom library, and each page landed where I asked. The library decides how the file is shown. Site Pages shows HTML files as SharePoint pages.
Every other library shows HTML files in the HTML Viewer, the same way it shows a Word, Excel or PDF file. The pages Copilot saved in other libraries also had no styling at all.
As of October 2026, support for HTML pages inside folders is limited, especially when Copilot creates the pages. I tested these folder scenarios:
| Scenario | Supported | Comment |
|---|---|---|
| Asking Copilot to save a new page into a folder in Site Pages | ❌ No | Copilot saves the page at the top level of Site Pages |
| Upload HTML folder creates the same folder in Site Pages | ❌ No | Every page lands at the top level of Site Pages |
| Moving HTML pages into a folder in Site Pages yourself | ✅ Yes | |
| Clickable hyperlinks between pages in the same folder | ✅ Yes | |
| A page that lists the files of a library | ⚠️ Partly | The page sees only the files at the top level of the library, not the files in subfolders. If you want files listed on an HTML page, do not put them in subfolders |
| A page that reads a CSV or Excel file stored in a folder | ✅ Yes |
You can keep HTML pages in folders in Site Pages, but you have to create the folders and move the pages into them yourself. In my tests, Copilot and Upload HTML folder put every page at the top level of Site Pages. Live data can read a single file inside a folder, but a page that lists a library’s files does not see the files inside folders.
The Site Pages menu now has Make homepage for HTML pages, and it works. The site’s address then opens the HTML page, with the site header and navigation around it.
The Site Pages library has a Create or upload button with Upload HTML page and Upload HTML folder.
An uploaded page opens as a draft that you can publish. An HTML file in any other library opens in the HTML Viewer, where the Open menu has a Code editor and an Open in HTML Viewer option.
If you move an HTML file into Site Pages with Move to, SharePoint treats it as a page. The file itself does not change.
Upload HTML folder uploads a whole folder at once, for example a small website saved on your PC. Here is what happens to each kind of file:
| File in your folder | What SharePoint does with it | Works on the page? |
|---|---|---|
| HTML pages | Saves them at the top of Site Pages as drafts. The folder itself disappears. | ✅ |
| Stylesheet (.css) | Copies its content into every page that uses it. The .css file itself is not saved anywhere. | ✅ |
| Image | Saves it in Site Assets under a new name and points the page to the new address | ✅ |
| Script file (.js) | Saves it in Site Assets under a new name and points the page to the new address | ❌ |
| Script written inside a page | Leaves it as it is | ✅ |
| Link from one page to another | Leaves it as it is. The link still opens the other page. | ✅ |
I ran this twice with a small test website: two HTML pages, a stylesheet, a script file and an image. Then I downloaded what SharePoint saved and compared it with the original folder.
The images and script files go to a new folder in Site Assets, under SitePages. The folder is named after the first page and its ID number, for example 107_folder2-index. Their content is not changed, only their names. Each name gets a code made from the file’s content, for example app_4bad72cf8f33c46c.js. An unchanged file gets the same code on every upload, and a changed file gets a new one.
This part confused me. SharePoint does not just store the .js files. It also rewrites the <script src="app.js"> line in the page so that it points to the renamed file in Site Assets, exactly as it does for images. So the browser does try to load the script, and the page’s security rules block it, because an HTML page may only run code written inside the page itself. Images load the same way and work. Scripts do not.
Microsoft does not explain this, so these are my guesses. The upload may simply treat every file except HTML and CSS the same way: save it in Site Assets, rename it, and point the page to it, without checking whether that kind of file can work on an HTML page. Or Microsoft may plan to allow scripts from Site Assets later, and the upload is already prepared for it. Either way, as of October 2026 the saved .js files serve no purpose. Nothing warns you about it, and the page simply runs without them.
The second test page had two scripts: one in a separate .js file and one written inside the page. After the upload, only the script inside the page ran.
If the pages are already uploaded, Copilot can fix them. I uploaded a test page with two separate .js files. After the upload, neither script ran:
Then I opened Copilot on the page and asked: “This page links to two JavaScript files that SharePoint saved in Site Assets. Copy the complete code of both files into script tags inside this page, replacing the script src tags. Do not change anything else.” Copilot replaced both script links with the code of the files, and both scripts ran:
I downloaded the saved page and compared it with my original files. The code of both .js files was copied byte for byte. The rest of the page did not change, apart from the theme colors and file information that SharePoint adds to every page it saves. The renamed .js files stay in Site Assets, where they are no longer used, so you can delete them.
Here is the same prompt in a reusable form. Open each uploaded page that uses .js files, open Copilot, and paste it:
I tested the version with “two JavaScript files”. The reusable one says “all” instead, so it works for any number of files, and asks Copilot to keep the order, because a script often depends on one that runs before it. Run it once per page. Copilot edits the page you have open, so pages that share a .js file each need the prompt.
The Site Pages library has a new File types button with an Allow HTML files switch. It was On on one of my sites and Off on another.
When the switch is Off, Create or upload in Site Pages becomes Create, so the upload options are gone, and + New on a site page has no HTML page item. Here is what changes:
But Copilot still builds HTML pages. On the site with the switch Off, I asked Copilot for a weather page and got one:
So the “Allow HTML files” switch stops people from uploading HTML. It does not stop Copilot.
HTML pages work with SharePoint’s built-in content approval, the same as modern pages. I tested it without any Power Automate flow. I turned on content approval for Site Pages (Library settings > Versioning settings > Require content approval for submitted items) and opened a draft HTML page. The Publish button became Submit for approval:
It opens the same dialog as on a modern page, with an optional comment:
After that, the page shows Pending approval, and an approver sees a Review request button:
The review panel shows who submitted the page, when, and their comment, with Approve and Reject buttons:
Once approved, the page becomes version 1.0, the same as a modern page.
An HTML page cannot load a stylesheet while it runs, even from its own site. I linked a CSS file in Site Assets from a page, once with <link> and once with @import, and neither loaded. Only styles written inside the page, in a <style> block, work.
| How the page gets its styles | Works? |
|---|---|
A <style> block inside the HTML file | ✅ |
<link rel="stylesheet" href="brand.css">, uploaded with Upload HTML folder together with brand.css | ✅ SharePoint copies the CSS into the page during the upload |
<link rel="stylesheet"> to a CSS file in Site Assets, by its full address | ❌ |
<link rel="stylesheet" href="brand.css"> in a page uploaded on its own, with brand.css uploaded into Site Pages next to it | ❌ |
@import of a CSS file in Site Assets | ❌ |
| A stylesheet from the internet, such as Google Fonts or a CDN | ❌ |
Upload HTML folder is the way to share one stylesheet between many pages. Keep one CSS file on your PC, in the same folder as your HTML pages:
A small stylesheet as an example:
In the <head> of each page, link the file by its name only, with no folder and no site address. This is the exact syntax:
Then go to Site Pages > Create or upload > Upload HTML folder and select the my-pages folder. SharePoint replaces the <link> line with a <style> block that holds the content of brand.css, so the page saved in Site Pages starts like this:
Every page in the folder gets the same copy, so they all share one design. The CSS file itself is not saved in SharePoint. I tested only a CSS file next to the pages, not in a subfolder.
The copy is made once, during the upload. Editing brand.css later does not change pages that are already in Site Pages. To apply a new design:
SharePoint replaces the existing pages instead of creating copies. In my test, both pages kept their IDs, went from version 0.3 to 0.5, and showed the new styles.
Keep a copy of the same file in Site Assets too. Copilot can read it there and copy its styles into the pages it builds, as described in the section on long prompts. Pages that Copilot builds this way also keep their own copy, so they do not change when you edit the file.
I changed the site’s theme from indigo to teal. The site header turned teal. The HTML page stayed indigo.
When Copilot creates a page, it copies the site’s colors into the page as fixed values. Later theme changes do not reach it. This confirms the point about brand drift in Yaroslav’s article.
I asked Copilot to “change the accent color of this page to match the current site theme”. It replied “Updated the page accent styling to use the current site theme”. The file had not changed at all.
On another page, I asked Copilot to “use the current site theme’s primary color as the accent”, and that worked. The page turned teal.
Pages can follow the user’s own dark mode, though. If the page’s CSS supports dark mode, it switches with Windows or the browser. Define your colors once as CSS variables, then give them dark values inside a prefers-color-scheme: dark block:
Use the variables everywhere instead of fixed colors, so nothing stays light in dark mode. A script can check the same setting with window.matchMedia('(prefers-color-scheme: dark)').matches, for example to pick chart colors.
I was hoping to have one reusable prompt that I could copy and paste into Copilot every time, with all my design rules in it. That was the reason for this test.
I was disappointed by the result. Copilot does not accept long prompts. I wanted the page to use Microsoft’s exact Fluent design colors and spacing, and my request plus the design values came to about 5.4 KB of text, roughly two pages. Copilot refused it.
There are two ways around the limit.
Save the long part of the prompt in a file in Site Assets and ask Copilot to read it. I saved the design values in two CSS files in Site Assets and asked Copilot to use them. It worked. The page used all 93 design values exactly.
If you want the Microsoft 365 look, you do not need to describe it at all. Ask Copilot to use the built-in React and Fluent UI libraries. Their components already come with Microsoft’s colors, fonts and spacing, so the prompt stays short. This prompt is short enough to reuse every time:
I ran this exact prompt. Copilot built the page in three steps, and the saved file is only 4.4 KB. It really uses Fluent UI: FluentProvider with webLightTheme, MessageBar, TabList with two tabs, a Card with CardHeader for each service, and Badge in green, yellow and red. Copilot even made the Incidents tab show only the services that are not healthy.
Copilot can reuse the design of an existing HTML page. I asked for two new pages in the same style as a reference page. Both new pages contained the reference page’s styles exactly, character for character.
There are two ways to ask. If you open the Copilot pane while you are on the reference page, you can say “this page”:
From anywhere else, name the reference page by its file name:
The copy worked really well. Here is the evidence: two new pages with different content, built by the two prompts above, with the same colors, fonts, cards and spacing as the reference page.
| Font | Result |
|---|---|
| A font file embedded in the page | Works |
| A font loaded from a website such as Google Fonts | Blocked, a default font is used instead |
| Segoe UI | Works. Windows already has it |
The simplest option is a font that the user’s computer already has. Segoe UI is on every Windows computer, and the other names cover Mac and phones:
For your own font, embed the font file inside the HTML as base64 text. A page can load fonts only from inside itself:
To get the base64 text of a font file, run this in PowerShell and paste the result after base64,:
Use the .woff2 version of the font, because it is the smallest, and remember that it counts toward the 10 MB limit. Each weight, such as regular and bold, is a separate file and a separate @font-face block. Always keep “Segoe UI” after your font name, so the page still looks right if the font fails.
This does not work, because the page cannot load anything from a website:
I asked Copilot to “change the font of this page to Inter”. It added the name Inter to the page’s font list, but did not embed the font. Most computers do not have Inter installed, so the page looked the same. Copilot said it was done.
Icons work well as SVG drawings inside the page. Copilot replaced emoji icons with Microsoft-style icons when I asked.
An SVG icon is written straight into the HTML, so it needs no file and no web address:
stroke="currentColor" makes the icon take the color of the text around it, so it also follows dark mode.
All six animation methods I tried work. Interestingly, a Windows 11 setting can affect animations on an HTML page. When Animation effects is turned off in Windows 11, the page detects it and skips the animation. I find that very curious: a setting on the user’s own computer changes how a SharePoint page behaves. It works when the page checks the prefers-reduced-motion setting, which Windows passes to the browser.
To make a page follow this setting, put the animation inside a prefers-reduced-motion: no-preference block. Users who turned animation effects off get the same page without the movement:
A script can check the same setting with window.matchMedia('(prefers-reduced-motion: reduce)').matches, for example to skip a count-up animation and show the final numbers right away.
When Copilot built the same app-style page with the built-in React and Fluent UI libraries, it looked the most authentic of all, with real Microsoft cards, badges, avatars, tabs and messages. The downside is about 9 MB of library code on every page view.
At a phone’s width, the page shrinks to fit. In the browser’s phone simulator I could not scroll by dragging, but I did not test a real phone.
An HTML page can adapt to the mobile form factor, but Copilot did not make it adapt. On a narrow mobile screen, four summary cards stayed side by side and squeezed until their labels were cut off.
This was a single test, so it is anecdotal. Still, my overall impression is that Copilot does not pay attention to small screens unless you specifically ask it to and work on it as a separate step.
Ctrl+P prints the page. Colored boxes print white unless the user turns on “Background graphics” in the print settings.
I tested the common browser features that pages use, one by one.
| HTML/JS feature | Result | What it means for your page |
|---|---|---|
| Animations and transitions | ✅ Works | Moving elements, fades, animated counters |
| Canvas drawing and 3D graphics (WebGL) | ✅ Works | Charts, diagrams and 3D scenes |
Running code written in the page, including eval and WebAssembly | ✅ Works | Heavy calculations are fine |
| Reading a file the user picks from their computer | ✅ Works | For example, preview a CSV file before using it |
Reading text aloud (speechSynthesis) | ✅ Works | The page can speak |
Copy button with document.execCommand('copy') | ✅ Works | Users can copy results |
| Dark mode, language and time zone of the user | ✅ Works | The page can adapt to the user |
| Links to pages in your tenant | ✅ Works | Navigation between pages |
| Saving anything between visits (cookies, local storage, IndexedDB) | ❌ Blocked | Every visit starts fresh |
Calling any web API, even SharePoint’s own (fetch, XMLHttpRequest, WebSocket) | ❌ Blocked | Data can only come through live data |
| Loading scripts from files or websites, or adding scripts later | ❌ Blocked | All code must be in the HTML file |
| Submitting a form | ❌ Blocked | Forms cannot send anything |
Pop-up messages (alert, confirm, prompt) | ❌ Blocked | Show messages on the page instead |
Opening a new window with window.open | ❌ Blocked | Use a normal link instead |
The modern clipboard API (navigator.clipboard) | ❌ Blocked | Use execCommand('copy') |
| Downloading a file, for example “Export to CSV” | ❌ Blocked | No export buttons |
Print button (window.print) | ❌ Blocked | Users can still press Ctrl+P |
| Full-screen mode, location, notifications | ❌ Blocked | |
| Web Workers (background code) | ❌ Blocked | Some libraries need a setting to work without them |
| Redirecting the whole browser window | ❌ Blocked |
When a script tries something blocked, nothing happens on the page, and the browser console shows why. Here a script tried to redirect the whole browser window and show an alert() message:
A reader showed me a page that checks a CSV file in the browser, so I built one to confirm it works. It’s a “New hire import checker” for an HR team. Someone picks the CSV file, or drags it onto the page, and the page checks every row before the file goes into the HR system. The file never leaves the user’s computer. The page reads it in the browser and uploads nothing.
My test file had 14 rows and 9 planted mistakes: a wrong email domain, a duplicate employee ID, an unknown department, impossible and US-style dates, a missing name, and an employee listed as their own manager. The page found all 9:
Below the summary, the page lists each problem and shows the file with the bad cells in red:
Dragging the file onto the page works too. While you drag, Windows shows a small “not allowed” sign next to the cursor, but the page still reads the file when you drop it:
The heart of the page is a few lines of JavaScript. A hidden file input and a drop zone both hand the file to FileReader:
Ideas where this kind of page helps:
The limits come from the same sandbox. The page cannot save the checked file anywhere, cannot offer a corrected file for download, and forgets everything when the user leaves. It can show the results on the screen, and a Copy button can put the problem list on the clipboard to paste into Excel or an email.
A JavaScript library is a ready-made file of code, for example one that draws charts. Microsoft lists five as supported. I got sixteen working. For Microsoft’s five, you only add a one-line library tag with the library’s name to your HTML file, and SharePoint adds the code. For the others, I included their full code in the HTML file. Both ways are explained below the table.
Why would you want a library at all? Because it gives a page abilities that plain HTML does not have. The page below uses Babylon, one of Microsoft’s five libraries, to draw 3D graphics. It reads a CSV file in Site Assets as live data, with made-up numbers, and turns each year of experience into a cube. The cubes drop into one tower per department, the counters follow them, and a click knocks a tower over. Babylon draws the scene, and a short script of my own moves the cubes. The whole page is one 13 KB HTML file:

It is not a super realistic example, since few intranets need exploding towers. It can give you ideas nonetheless.
| Library | What it does | On Microsoft’s list | How I got it working | Works |
|---|---|---|---|---|
| Chart.js | Charts | ⭐ Yes | Named it in the library tag | ✅ |
| Mermaid | Flowcharts and diagrams | ⭐ Yes | Named it in the library tag |
