Skip to content
Create with AI

Building a Simple Website with AI Help, from Request to Launch

How to build a one-page website with AI: what to decide first, the request, what to check in the result and what to weigh before you publish.

Rodrigo Faustino ·

Call number
CRI-001
Level
Beginner
Reading
13 min
Published
Labs
Prompt anatomy, Quiz

You can get a website online without writing a single line of code by hand. A bakery, a clinic, a private tutor, a neighborhood event: what these people almost always need is a page that says who they are, what they offer and how to reach them. An AI assistant writes that page in minutes. What it doesn’t do is know what you offer, check the result or take care of publishing.

This book shows the complete path with an example site, for a fictional bakery. Before going on, here is an honest account of what was actually done. The request you will see below was run by an AI assistant (Claude) to generate the site. The resulting file was opened in a test browser, on a computer screen and on a phone screen, and the checks in the verification section were carried out, with the real numbers. What was not done is publishing on a hosting service. That part appears as a list of decisions, and the author’s hands-on experience goes into the Teacher’s note.

The path in five steps

Five numbered steps, linked by arrows. 1, decide what the site needs to say: goal, audience and the real content, with names, prices and hours. 2, write the request: role, context, task, format and limits, as in any prompt. 3, receive the file and open it in the browser: an index.html file that opens with a double click, with nothing to install. 4, check what the AI doesn't check: phone, contrast, links, texts and data it made up. 5, ask for small adjustments, one at a time, and only then think about hosting and an address. At the bottom: publishing was not carried out in this book and appears as a list of decisions
The book's path, in five steps.

What to expect

A one-page site, made of HTML and CSS in a single file, is the safest starting point. HTML is the text of the page, and CSS is the look. A file like that opens with a double click on your computer and needs no server, database or programming. For many small businesses, that is enough.

What doesn’t fit this format: stores with a cart and payment, areas with a login, forms that send a message to your email on their own. All of that requires a program running on a server, and it is a different kind of project. If that’s your case, look for professional help or a ready-made platform for stores and sites. An AI assistant can help write that code, but the care needed for security and customer data is much greater.

Step 1: decide what the site needs to say

The most common mistake of people who use AI to build a website is to ask “make a website for my bakery” and expect the result to be their business. The AI doesn’t know your business. It will fill in whatever you didn’t give with what is common: invented prices, an address that doesn’t exist, some random opening hours. And all of it looks plausible.

So fill out a six-item sheet first. These are answers only you have.

Six cards in two columns. Goal: what action the visitor should take, such as ordering on WhatsApp, calling or viewing the menu. Audience: who will read it and on what device, usually a phone. Real content: name, products, prices, hours and address, and whatever you don't provide the AI makes up. Sections: header, introduction, menu, how to order and contact, all on one page. Contact: a channel that works without programming, such as WhatsApp or email. Tone and colors: warm or serious, with two or three colors that have good contrast. At the bottom: data you didn't fill in becomes made-up data, and it's worth rereading the site looking for what the AI added on its own
The six-item sheet to fill in before asking.

The most important item is the real content. If you don’t have the prices settled, write “price to be agreed” on the sheet instead of leaving it blank.

Step 2: write the request

The request follows the same five parts as any prompt: role, context, task, format and limits, as the book How to Structure a Text Prompt shows. What changes is what goes into each part. The lab below shows the request used in this book. Turn the parts on and off to see what each one does.

LabBuild your prompt: a bakery websiteTry it

Assembled prompt

RoleYou are a web developer who writes simple, accessible HTML and CSS.ContextI have a bakery that sells made-to-order and I want a page so customers can find me on their phones. Name: Rita's Bakery. Products: carrot cake with chocolate topping (10 slices), R$ 55.00; box of 12 brigadeiros in four flavors, R$ 36.00; lemon tart (8 slices), R$ 62.00. Orders placed 2 days in advance, on WhatsApp. All the data is sample data.TaskCreate a one-page website with an introduction, a menu, how to order and contact.FormatDeliver a single index.html file, with the CSS inside it, in English, that works well on a phone screen.LimitsNo JavaScript, no external libraries and no images. Don't make up a phone number, address or price: use only the data I gave and, where something is missing, write an example marked as fictional.
  • Role The point of view the AI answers from.
  • Context What you know and the AI doesn't: audience, reason, situation.
  • Task The request itself, with a clear verb.
  • Format How the answer should arrive: list, table, email...
  • Limits Length, what to avoid, and what is required.
Open this lab on its own page →
What to notice: Notice two parts. The context carries the real data, name, products and prices, which is why the AI doesn't need to make anything up. The limits forbid JavaScript, libraries and made-up data, and that keeps the file simple and checkable.

Three decisions in this request deserve an explanation. A single file, with the CSS inside: it’s easy to open, save, send and host. No JavaScript and no external libraries: fewer things that can go wrong, and the page loads faster. No made-up data: the instruction to mark whatever is missing as fictional is what keeps a fake phone number from slipping by unnoticed. It’s the same principle as in the book How to Ask for the Format of an Answer: List, Table, Steps: give the model an honest way out when information is missing.

Step 3: receive the file and open it

The result is a text file, which you save with the name index.html and open with a double click. The browser shows the page. The two images below are captures of the example site, the first at the width of a phone and the second at the width of a computer.

Screenshot, at the width of a phone, of a one-page website for Rita's Bakery. At the top, the bakery's name and three links: menu, how to order and contact. Then the headline Cakes and sweets made to order, just the way you asked, a line of introduction and a dark pink button with the text place an order. Next, three stacked cards with carrot cake for 55 reais, a box of brigadeiros for 36 reais and lemon tart for 62 reais, a three-step list for ordering, the sample contact details and a note in the footer saying the data is fictional
The example site at the width of a phone, 390 pixels. The data is fictional.
Screenshot, at the width of a computer, of the same site. The bakery's name is on the left and the links on the right. Below, the centered headline, the line of introduction and the place an order button. In the menu section, the three cards sit side by side, with carrot cake, a box of brigadeiros and lemon tart
The same site at the width of a computer. The menu cards sit side by side.

The complete code fits in a file under 4 KB. It is below, so you can see what it looks like and copy it. You don’t need to understand every line: what matters is recognizing the parts. Inside <style> is the look, and inside <body> is the content, in blocks such as <header>, <main> and <footer>.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Rita's Bakery | Cakes and sweets made to order</title>
  <meta name="description" content="Cakes, brigadeiros and tarts made to order. See the menu and order on WhatsApp.">
  <style>
    :root { --creme:#fff8ee; --marrom:#4a2c1d; --rosa:#a3305a; --borda:#ead9c3; }
    * { box-sizing: border-box; }
    body { margin:0; font-family: system-ui, "Segoe UI", Arial, sans-serif; color:var(--marrom); background:var(--creme); line-height:1.6; }
    a { color:var(--rosa); }
    header, main, footer { max-width: 960px; margin: 0 auto; padding: 0 20px; }
    header { padding-top: 28px; padding-bottom: 12px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
    header strong { font-size: 1.4rem; }
    nav a { margin-right: 16px; text-decoration: none; font-weight: 600; }
    .topo { padding: 48px 20px; text-align: center; }
    .topo h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0 0 12px; line-height: 1.2; }
    .botao { display:inline-block; background:var(--rosa); color:#fff; padding:14px 26px; border-radius:999px; text-decoration:none; font-weight:700; }
    .botao:focus-visible, nav a:focus-visible { outline: 3px solid var(--marrom); outline-offset: 3px; }
    section { padding: 28px 0; }
    .cartoes { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .cartao { background:#fff; border:2px solid var(--borda); border-radius:16px; padding:20px; }
    .cartao h3 { margin-top:0; }
    .preco { font-weight:700; color:var(--rosa); }
    ol { padding-left: 22px; }
    footer { padding-bottom: 40px; font-size: .95rem; border-top: 2px solid var(--borda); padding-top: 20px; }
  </style>
</head>
<body>
  <header>
    <strong>Rita's Bakery</strong>
    <nav aria-label="Main">
      <a href="#cardapio">Menu</a>
      <a href="#encomendas">How to order</a>
      <a href="#contato">Contact</a>
    </nav>
  </header>
  <main>
    <div class="topo">
      <h1>Cakes and sweets made to order, just the way you asked</h1>
      <p>Homemade recipes, fresh ingredients and delivery arranged on WhatsApp.</p>
      <a class="botao" href="#contato">Place an order</a>
    </div>

    <section id="cardapio">
      <h2>Menu</h2>
      <div class="cartoes">
        <article class="cartao">
          <h3>Carrot cake</h3>
          <p>Chocolate topping. Serves 10 slices.</p>
          <p class="preco">R$ 55.00</p>
        </article>
        <article class="cartao">
          <h3>Box of brigadeiros</h3>
          <p>Twelve pieces, in four flavors of your choice.</p>
          <p class="preco">R$ 36.00</p>
        </article>
        <article class="cartao">
          <h3>Lemon tart</h3>
          <p>Crisp crust and light cream. Serves 8 slices.</p>
          <p class="preco">R$ 62.00</p>
        </article>
      </div>
    </section>

    <section id="encomendas">
      <h2>How to order</h2>
      <ol>
        <li>Choose the sweet from the menu.</li>
        <li>Send a message with the day and time you want to receive it.</li>
        <li>Confirm the order at least 2 days in advance.</li>
      </ol>
    </section>

    <section id="contato">
      <h2>Contact</h2>
      <p>WhatsApp: <a href="https://wa.me/5500000000000">(00) 00000-0000</a></p>
      <p>Email: <a href="mailto:contato@exemplo.com.br">contato@exemplo.com.br</a></p>
    </section>
  </main>
  <footer>
    <p>Example site, with fictional data. The prices and contact details above are not real.</p>
  </footer>
</body>
</html>

Notice what the AI did well, which you can ask for on any site: it used the page-structure markers (header, main content, footer) and the tag that makes the site adjust to a phone screen. It also added lang="en", which tells the browser and screen readers what language the page is in, and a title and a description, which appear in search results.

Step 4: check what the AI doesn’t check

This is the step that separates a finished site from a site that only looks finished. The AI hands over the file with confidence, but it didn’t open the result on a phone or measure anything. You are the one who checks. The table shows what was checked on the example site, each row with a real result.

A table with five rows and three columns: what to check, how and result. Opens without errors: open the file and read the browser console, with no error messages. Fits the phone screen: open at 390 pixels wide and measure whether there is sideways scrolling, with no sideways scrolling. Text contrast: calculate the ratio between the text color and the background color, with the first version below 4.5 and then corrected. Links: read the address of each link, with WhatsApp and email being examples to replace. Made-up data: read everything looking for what you didn't provide, with fictional prices and contacts marked in the footer. At the bottom: loading speed on real hosting, reading with a screen reader and keyboard-only navigation were not measured
Five checks run on the example file.

A real mistake: contrast

The check found a problem. The first version of the site used an accent pink, #c2527a. Calculating the contrast ratio, the pink link on the cream background came to 4.16, and the white text on the pink button came to 4.39. The W3C accessibility guidelines (WCAG 2.1, level AA) ask for at least 4.5 for normal text, and 3 for large text, which means 18 points or more, or 14 points in bold. The button text was 16 pixels in bold, a common size that doesn’t count as large. Both fell below the minimum.

Two cards side by side. On the left, first version: accent color c2527a, pink link on the cream background with a ratio of 4.16, white text on the pink button with a ratio of 4.39, and the minimum for normal text is 4.5, so both fell below it. On the right, after the adjustment: accent color a3305a, link on the cream background with a ratio of 6.37, white text on the button with a ratio of 6.71, and both pass the minimum of 4.5. At the bottom: the rule comes from criterion 1.4.3 of the W3C accessibility guidelines, and the adjustment requests changed only the color
Contrast before and after the adjustment, with the measured numbers.

The fix was to ask for a single change: replace the accent color with a darker one, with a contrast ratio of at least 4.5 against the background and against white. The result, #a3305a, passed with room to spare. That is the right rhythm of working with AI: it delivers fast, you measure, you ask for an adjustment and you measure again. The sites shown in the images already have the corrected color.

There are free tools online for calculating the contrast ratio between two colors, and the browser also shows this information when you inspect an element. You don’t have to do the math by hand.

Step 5: ask for small adjustments

After the first version, you’ll want to change things. The rule that helps most: one adjustment per request, saying what must not change. Compare:

  • Risky request: “Improve the look of the site.” The AI may rewrite everything, including what was good.
  • Safe request: “Change only the accent color to a darker one, with a minimum contrast of 4.5 against the background and against white. Don’t change anything else. Return the whole file.”

Asking it to “return the whole file” avoids a common problem: getting only a piece of the code and having to guess where it fits. And save each version under a different name, such as index-v1.html and index-v2.html, so you can go back.

Contact form: what a simple site doesn’t do

It’s common to ask for a form “so the customer can send a message.” A one-file site can’t send that message to your email, because that requires a program on a server. The AI can write a good-looking form that sends nothing, and you only find out when a customer complains.

The simple alternatives, which the example site uses, are the WhatsApp link and the email link. If you really need a form, there are third-party services that receive the messages and forward them, and then the questions from the book What Not to Paste into the Chat: Privacy and Personal Data come in: what does that company do with your customers’ data? For a site that collects people’s data, Brazil’s data protection law (the LGPD) also applies, and it’s worth getting guidance.

Publishing: what to decide

This part was not carried out in this book, and that is why it offers questions rather than a step-by-step. To put the site online, you need to decide four things.

  • Where to host it. A service that stores the file and delivers it to whoever visits. There are website hosting plans and services specialized in static sites, some with a free plan. Read each one’s conditions, because prices, limits and rules change.
  • Which address. A domain of your own costs money each year and inspires more trust than a borrowed free address. For a domain ending in .br, registration is done at Registro.br.
  • HTTPS. The padlock in the address. Most services offer it, and browsers now warn you when it’s missing.
  • Who looks after it afterward. Someone has to renew the domain, update prices and check that the links work. An outdated site inspires more distrust than no site at all.

Before publishing, reread the whole site as if you were a customer: are the prices right? Is that your phone number? What was left over from the example? This is the moment to hunt for the “(00) 00000-0000” that got forgotten.

Think before reading the answer

You asked the AI for the website of a psychology practice and it returned a pretty page with “We see patients Monday through Friday, from 8 a.m. to 8 p.m.” and an address on Avenida Paulista. You didn’t give it either of those details. What do you do?

Answer: you treat both as made-up data and replace them with your own. The AI filled in what it didn’t receive with what is common. And on a practice’s website, a wrong address or hours send a patient to the wrong place. The prevention is in the sheet from step 1 and in the instruction not to make up data in the request. The final check is reading the whole site, line by line.

Test what you took in

Six questions about the path and the checks.

LabQuiz: building a website with AITry it

Building a website with AI: what do you remember?

  1. Question 1 of 6

    Why fill out the sheet before asking for the site?

    • Because the AI requires a sheet in order to work
    • Because whatever you don't provide, the AI tends to make up with something plausible
    • Because the sheet makes the site faster
    • Because the sheet makes the final check unnecessary
    Show answer

    Right answer: B. The AI doesn't know your business and fills the gaps with what is common, such as prices, address and hours. The sheet gathers the real data.

  2. Question 2 of 6

    What can't a one-file site (HTML and CSS) do on its own?

    • Show texts and menu cards
    • Adapt to the phone screen
    • Send the message from a form to your email
    • Have links to WhatsApp
    Show answer

    Right answer: C. Sending messages requires a program on a server. A simple site can have WhatsApp and email links, or use a third-party service, with the data precautions.

  3. Question 3 of 6

    A button has white 16-pixel bold text on a pink background. The contrast ratio is 4.39. What follows, under WCAG 2.1 level AA?

    • It passes, because the text is bold
    • It fails, because normal text requires at least 4.5
    • It passes, because the minimum is 3 for any text
    • You can't tell without testing on a phone
    Show answer

    Right answer: B. Large text is 18 points or more, or 14 points in bold, which is roughly 24 and 18.5 pixels. 16-pixel bold text is normal and requires 4.5.

  4. Question 4 of 6

    What is the best adjustment request after the first version?

    • Improve the look of the site.
    • Change only the accent color to a darker one, don't change anything else and return the whole file.
    • Redo everything from scratch.
    • Make the site prettier and faster.
    Show answer

    Right answer: B. One adjustment per request, saying what must not change and asking for the whole file back, avoids regressions and makes it easier to compare versions.

  5. Question 5 of 6

    What did this book NOT carry out, and therefore present as a list of decisions?

    • Generating the site
    • Opening it in the test browser
    • Measuring the contrast
    • Publishing on a hosting service
    Show answer

    Right answer: D. Generating, opening and measuring were done. Publishing was not carried out, and the hands-on experience goes into the Teacher's note.

  6. Question 6 of 6

    Before publishing, what is the last recommended check?

    • Read the whole site as a customer would, looking for made-up or sample data
    • Trust what the AI delivered, because it reviews what it writes
    • Change all the colors
    • Delete the page title
    Show answer

    Right answer: A. Sample or made-up phone numbers, prices and addresses have gone live for lack of this reading. The AI doesn't check what it wrote.

Open this lab on its own page →
What to notice: If you missed the question about the form, reread the section on what a simple site doesn't do. If you missed the one on contrast, go back to step 4.

Common mistakes and precautions

Asking for the site without giving the data. What you don’t give, the AI makes up, and it looks right.

Publishing without reading the whole site. Sample prices, fake phone numbers and made-up addresses have gone live this way.

Not opening it on a phone. Most visitors to a local business arrive on a phone. Open the page on a narrow screen before you decide.

Thinking pretty means accessible. Low contrast, a missing title and meaningless links slip through. Measure the contrast and read the page without looking at the design.

Asking for many changes at once. It becomes impossible to know which change broke something. One adjustment per request, and one saved version at a time.

Expecting a form to work on its own. Without a server, it sends nothing. Use WhatsApp and email, or a third-party service with the data precautions.

Using a library or service you don’t understand. The more outside pieces, the more things that can go offline or change their rules. For a simple site, less is more.

To keep going

References

  1. W3C Web Accessibility Initiative. Understanding Success Criterion 1.4.3: Contrast (Minimum), Minimum contrast ratio of 4.5 for normal text and 3 for large text, at level AA, and the definition of large text. Consultado em Nov 28, 2026.
  2. OpenAI. Prompt engineering, Instructions that fix the format of the answer, such as returning only the requested code, without Markdown. Consultado em Nov 28, 2026.

On the same shelf1 book