My first Copilot HTML page came back with every chart bar drawn as a solid black block. The second prompt fixed it in 18 steps. After a day of testing, the prompt mattered more than anything else on the screen.
Key takeaways
- Give Copilot the audience, the sections, the data source and the look; leave any out and it fills the gap with a generic layout.
- Name lists exactly as they appear on the site and say “use as live data” when you want numbers that update.
- Plan a second prompt: say what is wrong on the published page and what it should look like instead.
The steps for creating and uploading pages are in How to create HTML pages in SharePoint with Copilot or your own file. Each prompt below says which MST demo site it fits and whether I tested it.
On this page
Five parts of a good page prompt
| Part | What to say | Example |
|---|---|---|
| Audience | Who reads it and how long they spend | “for department heads who want a two-minute view” |
| Purpose | The one thing the page should do | “an overview of our research work” |
| Sections | Each block, in order | “summary cards, a bar chart, a searchable table” |
| Data | Lists or files by exact name, and live or static | “Use the Experiments Register list on this site as live data” |
| Look and rules | Colours, layout, accessibility | “site theme colours, white cards, readable on a laptop” |
You can paste this template and fill in the brackets:
Create an HTML page called '[title]' for [audience] who [what they need]. Use [list or file names] on this site as live data. Include: [section 1], [section 2], [section 3]. Use the site theme colours, [layout notes], and make it accessible and readable on a laptop screen.
Prompts for new pages
1. Programme overview from two lists (MST Research and Development, tested). This built the page with live counts that matched the list:
Create an HTML page called 'R&D Programme Overview' for department heads who want a two-minute view of our research work. Use the Experiments Register and Research Ideas lists on this site as live data. Include: a row of summary cards with the number of experiments by status, a bar chart of experiments per programme, a searchable table of the 20 most recent experiments (programme, rig, start date, status), and a section with the newest research ideas. Use the site theme colours, white cards with soft shadows, and make it accessible and readable on a laptop screen.
2. Event announcement (MST Social Club, tested). Short prompts work for simple pages; Copilot finished in 6 steps:
Create an HTML page for this site announcing the MST Social Club quiz night on Friday 12 December at 7 pm in the Karachi office cafeteria, with a short agenda and a sign-up section.
3. Project status for a steering committee (MST PMO, ready to try):
Create an HTML page called 'Portfolio status' for the steering committee. Use the Project Register, Milestones and Risk Register lists on this site as live data. Include: one card per project showing stage and RAG status, milestones due in the next 30 days, and the five highest-score open risks. Keep it to one screen with tabs for Projects, Milestones and Risks.
4. Policy hub with search (MST Intranet, ready to try):
Create an HTML page called 'Policy finder' for all staff. List the documents in the Company Policies library grouped by category, with a search box at the top that filters as I type, and a short 'What changed this month' section for files modified in the last 30 days. Link each policy to its file.
5. Office directory (MST Intranet, ready to try):
Create an HTML page called 'Our offices' using the Office Locations list as live data: one card per office with address, phone and opening hours, and tabs for Karachi, Dubai and London. Add the next three Company Events for each office under its card.
6. Sales pipeline snapshot (MST Sales and Marketing, ready to try):
Create an HTML page called 'Pipeline this quarter' for the sales leadership team. Use the Sales Pipeline list as live data. Show total pipeline value in USD, value by stage as a funnel, deals expected to close this month with owner and probability, and the top five accounts by value.
Prompts for fixing a page
These two fixed real problems on my test pages. Describe what you see, where it is, and what it should look like.
Hidden button (fixed in 4 steps):
The Raise a ticket button is hidden behind the three stat cards. Move it inside the dark header, below the intro text, and make it a white button. Use this link for it: https://mstalk.sharepoint.com/sites/MST-ITServiceDesk/Lists/Service%20Desk%20Tickets/NewForm.aspx
Give the full URL when a button points to a list form. Copilot couldn’t find the list on its own on that site, because the site is kept out of Copilot.
Broken chart and table (fixed in 18 steps):
On the published page the 'Experiments per programme' chart shows every bar as a solid black bar at full width, and the experiments table and research idea cards have lost their styling. Fix the chart so each bar length matches its count and uses the site theme colour, give the table a header row, borders and zebra rows, and show each research idea as a white card with its category, date and votes on separate lines.

Three more I use for an uploaded page (ready to try):
- “Change the colours and fonts on this page to match this site’s theme.”
- “Check this page for accessibility: colour contrast, heading order and alt text, and fix what you find.”
- “This page is close to the 10 MB limit. Remove unused CSS and markup without changing how it looks.”
Building HTML outside SharePoint
You can write the page with any AI assistant and upload it. Tell it SharePoint’s rules up front, or the page will try to load fonts and scripts that the sandbox blocks:
Build a single self-contained HTML file for a SharePoint HTML page. Put all CSS and JavaScript inline in the same file. Don't load fonts, images, scripts or styles from other websites; use system fonts and inline SVG. Don't call any API or use fetch, and don't use localStorage. Use semantic HTML, keyboard-accessible tabs and good colour contrast. The page is: [describe it].
SharePoint also publishes the rules on every tenant at https://[tenant].sharepoint.com/_html: the sandbox, the Content Security Policy, the libraries you can use and the live data format. Point your assistant to that page and it writes HTML that renders first time.
My two sample pages, an IT self-help page and a first-30-days checklist, were built this way and uploaded without changes. You can download both from GitHub: SharePoint-HTML-Pages and upload them to your own Site Pages library.





Leave a Reply