The Best AI Prompts for Building a Single-File Website
The most useful instruction you can add to a website prompt is "as one self-contained HTML file, with inline CSS and JavaScript, no external dependencies." Without it, models often hand you separate HTML, CSS and JavaScript files, and those need extra work before they can go online.
Why the wording matters
ChatGPT, Claude and Gemini can all produce a website from a plain description, but by default they sometimes assume a full project: separate HTML, CSS and JavaScript files, or a framework-style structure. That's normal for a developer project. It gets in the way when all you want is a page you can paste into a host and share. Telling the model what shape of output you want avoids the problem.
The prompt formula
A good website prompt covers these points:
- What the page is for and what goes on it. "A page for my bakery with opening hours and three cakes" works better than "a bakery website".
- The format: "as a single HTML file with inline CSS and JavaScript, no external dependencies."
- The look. Colors, a mood, or a comparison such as "dark theme" or "like a modern app landing page".
- What to leave out, mainly invented reviews, awards and numbers (more on that below).
Ready prompt: a simple business website
If you need a plain website for a business, start with this prompt. Copy all of it into ChatGPT, Claude or Gemini and change only the text in square brackets:
Make me a website about: [describe your business, offer, city, phone, e-mail].
Requirements:
- one HTML file with all CSS and JavaScript inside, no separate files and no build step;
- content in English, looks good on phones and computers;
- sections: header with a tagline, offer, about, contact;
- images only from https addresses or as CSS frames;
- no invented customer reviews, awards or numbers;
- the business name in <title>.
Reply only with the code in one ```html block, from <!DOCTYPE html> to </html>.
What to put in the brackets. The more specific, the fewer fixes later. Example: “Scissors hair salon, 1 Example Street, Leeds. Women’s and men’s cuts, colouring, wedding styling. Open Mon-Fri 9-6, Sat 9-2. Phone 0113 000 0000, email hello@example.com.”
Why it is this long. Each line closes one common problem:
- “one HTML file”: you can paste the code and publish it right away;
- “frames in CSS”: no broken images when the AI makes up a photo address;
- “no invented reviews”: no fake testimonials or “500 happy customers” on your page;
- “business name in <title>”: the browser tab and the Google result show the right name;
- “reply only with code in one block”: no cutting the code out of explanations.
The same prompt is in the Hostilo dashboard, in the AI Library tab. The ChatGPT, Claude and Gemini buttons open the chat with the prompt already filled in.
Ready-to-use prompts
Copy any of these into ChatGPT, Claude, or Gemini and adjust the details:
Portfolio: "Create a single HTML file (inline CSS and JS, no external dependencies) for a freelance designer's portfolio. Include a hero with name and title, a grid of 4 project cards, and a contact section. Dark theme, clean sans-serif typography."
Landing page: "Write a single-file HTML landing page for a productivity app called Focus. Include a headline, three feature cards, a pricing section with two tiers, and an email signup form. Inline all CSS and JS, no external dependencies, mobile-responsive."
Waitlist page: "Build a single HTML file for a waitlist page for an early-stage startup. Headline, one-sentence description, an email input with a submit button, and three short points on what people on the list will get. Inline CSS and JS only."
Event page: "Create a single-file HTML event page for a one-day workshop. Include date, location, a short agenda list, and a registration button. Warm color palette, no external dependencies."
Simple game: "Build a small browser game in one self-contained HTML file: a simple version of [game]. Use only vanilla JavaScript and inline CSS, controllable with arrow keys, no external libraries."
What the AI should not make up
Models like to add things that look credible: customer reviews with names, “over 10 years of experience”, awards, the number of clients served. On a business website that is a risk. A customer who spots one invented review stops trusting the rest, and fake reviews can break consumer protection rules. So say it plainly in the prompt: “no invented reviews, awards or numbers”. If you want a reviews section, paste real ones or ask for an empty slot labelled “insert a real review here”.
Habits that keep the output clean
Always add "mobile-responsive" if the page needs to work on phones, because it is not assumed by default. Ask for changes in follow-up messages rather than rewriting the whole prompt; models handle "make the button blue and add a footer" better than a second giant prompt. If a model returns split files anyway, one line fixes it: "combine this into a single HTML file with everything inlined." And keep the prompt that worked. When you need another page in the same style, reuse it and change only the content.
Frequently asked questions
What is the most important instruction to add to a website prompt?
Ask for the output as a single, self-contained HTML file with inline CSS and JavaScript and no external dependencies. This instruction decides whether the result can be pasted directly into a host.
Does this work the same way in ChatGPT, Claude, and Gemini?
Yes. All three general-purpose AI assistants can write complete single-file HTML on request; the prompt structure in this guide works across all of them.
What if the AI splits the code into multiple files anyway?
Ask it to combine everything into one HTML file with the CSS and JavaScript inlined. This usually works even after the fact.
Can I use these prompts to build something interactive, not only a static page?
Yes. Single-file HTML can include full JavaScript logic, so games, calculators, and interactive tools work with the same approach as a static landing page.
Where do I paste the code the AI gave me?
In Hostilo, click “Start the wizard” at the top of the Projects tab, paste the whole answer (the wizard cuts the code out of the explanations), pick an address and click “Publish the site”. The site goes live right away at name.hostilo.page with HTTPS.
Put your AI site online
Copy the prompt, paste the AI’s code into the wizard and get a live HTTPS link in a minute or two. Free to start, no credit card.
Publish your site free

