Topic guide
AI-Made Pages
AI assistants can write a whole web page in seconds. Here is how to get that page out of the chat and onto a link people can open.
Asking an AI assistant for a landing page, an event invite or a small portfolio is now a normal way to start a website. The code it writes is ordinary HTML, CSS and JavaScript, so it can be hosted like any other page. The tricky part is the handoff from chat window to file.
Step 1: Get the complete code
Most assistants show code in a box with a copy button. Before you copy:
- Ask for a single file. A prompt like “Put everything, including CSS and JavaScript, in one HTML file” saves you from juggling several files.
- Make sure it is complete. The code should start with
<!doctype html>and end with</html>. Long answers are sometimes cut off; ask the assistant to continue or to resend the full file. - Watch for placeholders. Phrases like “add your content here” or “rest of the code stays the same” mean the file is not finished.
Some tools, such as Claude’s artifacts or ChatGPT’s canvas, show a live preview and offer a download. If yours does, download the file instead of copying.
Step 2: Save it as index.html
- Open a plain text editor. On Windows, Notepad works; on a Mac, use TextEdit in plain text mode (Format, then Make Plain Text) or a free code editor.
- Paste the code.
- Save it as
index.html. Check that your computer did not add.txtto the end. - Double-click the file. It should open in your browser and look like the preview.
You can also paste the code into the HTML previewer, check it, and use its download button to get a correctly named file.
Step 3: Find files the AI assumed you have
AI-written pages often reference images, logos or scripts that do not exist yet, such as hero.jpg or assets/logo.svg. Paste the code into the HTML path checker to see every file the page expects. For each one, you can:
- add your own file with exactly that name and path,
- swap the path for an image you do have, or
- ask the assistant to remove the reference or use a simple CSS shape instead.
Step 4: Check the things AI often gets wrong
| Check | Why it matters | How to fix |
|---|---|---|
Viewport tag in <head> |
Without it, phones show a zoomed-out page | Ask the AI to add a responsive viewport meta tag |
| Real page title | Shown in the browser tab and link previews | Edit the text inside <title> |
| Working form | A form needs a service to receive the data | Use a form service or replace it with an email link |
| Placeholder text and links | “Lorem ipsum” and href="#" look unfinished |
Search the file for # and lorem |
| External libraries | Code may load scripts from CDNs | Fine for most pages, but keep the links on https:// |
Contact forms deserve a special mention. HTML alone cannot send an email. If the assistant wrote a form, it needs a form-handling service, a serverless function, or a plain mailto: link instead.
Step 5: Publish it
Upload index.html (and any image or style files, in the same folder layout) to a static host. Drag-and-drop hosts are the quickest for a first page. The full walk-through is in hosting an HTML file, and the trade-offs between hosts are in free hosting alternatives.
Step 6: Make changes the easy way
When you want to change something, paste the current file back into the chat and ask for a specific edit: “Change the headline to X and keep everything else the same.” Then replace your file and upload again. Keep each version, for example index-2026-12-04.html, so you can go back if an edit breaks something.
Small text edits are often faster by hand. Our HTML and CSS basics guide shows how to find and change text, colors and images without breaking the layout.
Writing better prompts for web pages
- Describe the audience and the single goal of the page (“a one-page invite for a 40-person book club meeting”).
- List the sections you want, in order.
- Ask for “one self-contained HTML file, mobile-friendly, no external images”.
- Mention accessibility: readable font sizes, good color contrast and alt text on images.
- Ask it to explain anything you will need to edit later, such as where the colors are set.
Quick checklist
- Complete code saved as
index.html - Opens correctly from your computer
- All referenced files exist, or references removed
- Viewport tag and real title present
- Forms handled or removed
- Uploaded and checked on a phone
Tools
Free tools
Small, free tools that run right in your browser. No sign-up, nothing to install.
-
HTML previewer
Paste HTML and CSS, see it live in a safe sandbox, then download it as an index.html file.
Open tool -
File size checker
See if your files fit a host's upload limits before you try. Nothing is uploaded.
Open tool -
HTML path checker
List every link, image and script in a page and flag the paths that will break once hosted.
Open tool