The project we will build
Permalink:The card answers a question someone might have while sorting packets at a kitchen table: what should I write on the envelope? It opens with a title and a short introduction, then gives you a packing list and a sample label. There's no event registration or record of which seeds people bring. If you share the page, everyone reads the same instructions.
At the end of the exercise, the browser tab should say "Seed swap packing card." The heading on the page should say "Pack for the seed swap." The packing list should show paper envelopes and a pen, in that order. The sample label should be hidden at first and visible only after you open the section. Keep those expected results handy while you review the first draft. They give you a way to tell if the draft works even if the tool chose different colors or spacing.
Pick your tool
Permalink:Use an AI chat and a plain text editor if you'd rather paste the file yourself.
If you'd rather have the tool save it for you, use a coding agent that lets you review edits.
Open an empty folder called seed-card and use only that folder for the exercise.
For the chat path, save a new file named index.html there and choose plain text if your editor asks for a format.
For the agent path, ask it to create that one file and keep permission to run commands or publish turned off.
You need a browser as well as an editor.
Leave the editor open when you double-click index.html in your file manager to view it.
Your browser displays the saved file and your editor changes the file itself.
If the browser shows tags instead of a page, check that the full filename is index.html and that the file contains plain HTML, without Markdown backticks or the AI's introduction.
On a computer that hides file extensions, use your file manager's file details to check the full name.
The first prompt
Permalink:Paste the prompt below into your tool. It gives the tool the actual wording and tells it how the two controls should behave. That leaves you with a small draft you can compare against the instructions.
Write one index.html file for a seed swap packing card.
Set the browser tab title to "Seed swap packing card".
Use "Pack for the seed swap" as the visible main heading.
Add this introduction: "Bring seeds in dry paper envelopes you can label."
Add a link named "Jump to the packing list" with href="#packing-list".
Give the "Packing list" heading id="packing-list".
List "Paper envelopes" and "A pen" as unordered list items.
Below the list, use HTML details and summary with no open attribute.
Use "How to label a packet" as the summary.
Inside the disclosure, put "Example: Calendula, collected October 2026."
Put any CSS in the head of the file and use no scripts, packages, or external assets.
Use a layout that wraps on phones and keep the browser's visible keyboard focus.
Return the complete file and do not publish it.
If the tool writes several files or tells you to install something, ask for the single file again. Save and open the draft even if you plan to adjust the colors later. If the draft doesn't run or you want a known version to compare against, the example below is the complete file. You can paste it as-is and continue.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Seed swap packing card</title>
<style>
body {
margin: 0;
font-family: system-ui, sans-serif;
line-height: 1.6;
color: #1f2d24;
background: #f7faf5;
}
main {
max-width: 38rem;
margin: 0 auto;
padding: 1.25rem;
}
a {
color: #174f34;
}
details {
border: 1px solid #56685c;
padding: 0.75rem;
}
a:focus-visible, summary:focus-visible {
outline: 2px solid #174f34;
outline-offset: 3px;
}
</style>
</head>
<body>
<main>
<h1>Pack for the seed swap</h1>
<p>Bring seeds in dry paper envelopes you can label.</p>
<p><a href="#packing-list">Jump to the packing list</a></p>
<h2 id="packing-list">Packing list</h2>
<ul>
<li>Paper envelopes</li>
<li>A pen</li>
</ul>
<details>
<summary>How to label a packet</summary>
<p>Example: Calendula, collected October 2026.</p>
</details>
</main>
</body>
</html>
Reading the output
Permalink:Start at the top of the file and find the head and body.
The head holds the tab title and the style rules.
The body holds what people read on the page.
Change a word in the visible heading and save the file.
Reload the browser tab to see the change.
Look at the tab as well as the heading to see which one changed, then restore the original wording.
You can repeat that experiment with the title if you want to check that the two pieces of text are independent.
Find the main element, which wraps the card's content.
Inside it, ul groups list items where order doesn't matter, and each li holds one item.
The details element holds the part you can open, and summary gives that control its label.
Because the file leaves out the open attribute, a fresh load starts with the details closed.
The browser handles opening the section, so you don't need a script to make it work.
Now check the page from a fresh tab with the mouse set aside:
- Press Tab until you reach "Jump to the packing list."
Find the visible focus outline, then press Enter and look for
#packing-listat the end of the address. On a short page, the heading may already be visible and the page may barely move. - Press Tab until "How to label a packet" has focus, or use Shift+Tab if you pass it. Press Enter to reveal the sentence about calendula. Press Enter again and check that the sentence disappears while the summary is still available.
- Make the window narrow or open your browser's phone preview. Check that the heading can wrap and that the list and opened label can be read without sideways scrolling.
If you want to find the source of a visible detail, right-click the packing heading and choose Inspect.
The inspector shows the elements the browser built, including the heading's id.
The style pane shows rules applied to the element you select.
You can try a color there, but changes in the inspector are temporary, so save any change you want to keep in index.html.
Try one style change
Permalink:In the example, max-width: 38rem gives the card room to get narrower while limiting how wide the text gets on a large screen.
If your draft uses width with a fixed value instead, the card may stick out past the edge of a phone screen.
On a wide screen, try changing the example's 38rem to 24rem and reload.
The card should have shorter lines, while the list and the label feature should still work the same way.
Restore 38rem after the test, or keep the narrower version if you can read it comfortably with the label open.
Look for padding on main if the text feels too close to the edge.
Padding adds space inside the card.
If you change it, test at both large and small widths and open the label at each width.
Checking only the closed card tells you nothing about whether the revealed text fits.
If you would like the AI to explain a rule, paste that rule along with the selector, which is the part that says what the rule applies to.
For instance, main before the opening brace tells you that the rules inside apply to the element that wraps the card.
Fixing what the AI got wrong
Permalink:A link can look right and still point to a name that isn't in the document.
To practice that failure on the working version, save a backup outside the project folder and change only the heading's id from packing-list to packing.
Open the saved file in a new tab so no fragment from a previous test is in the address.
Activate the link and notice that the address can still end in #packing-list, even though there is no matching target.
The address alone didn't prove the link worked.
Search for packing-list in the editor.
With the deliberate mistake, you'll find the name on the link but not on the heading.
Change the heading back to id="packing-list" and save.
Open a fresh tab again and activate the link.
The name after # now matches a single element in the file.
If the heading is already on screen, narrow the window or increase zoom so you can see the jump more easily.
If your AI draft has that problem, give the tool the observed mismatch instead of asking it to redo the page. You can also apply the same one-line fix yourself.
In index.html the packing link points to #packing-list, but the heading has id="packing".
Change only that heading's id to packing-list and leave the link and other markup unchanged.
Show the before and after lines.
Compare those two lines against your saved file and test the link and the disclosure again.
If the disclosure is open on a fresh load when you wanted it closed, look for an open attribute on the details tag and remove the attribute entirely.
Writing open="false" still leaves the attribute present.
If you want another practice edit, change only the sample label to a seed name you know, then check that it still shows only when you open the section.
If clicking the summary works but you can't reach it by pressing Tab, inspect what the draft used for the control.
A line of styled text can look like the example without being a summary element at all.
Compare it with the working file and make sure the summary is the first child of details.
Publishing
Permalink:For the local finish, keep the checked index.html and open it again after closing the editor.
If the link has a matching target and you can open and close the label with the keyboard, you've finished the example.
You can give someone the file to open in their browser without a host, but they won't be able to open a link to the file on your own computer.
To give the card a web address, choose a static host with a manual upload option and make sure you are willing to make the entire file public.
Upload a clean folder containing only index.html at its top level, or zip that folder's contents if the host asks for an archive.
Use the address the host gives you, not the file address from your browser.
In a private window, check that the live tab title is correct and run the link and disclosure tests again.
A private window checks that you can see the page without an existing sign-in session on that browser; it doesn't make the hosted file private.
If the host shows a missing-page message, check for an extra folder around index.html in what you uploaded.
For a bigger example that includes a separate stylesheet and a release checklist, read how to vibe code a website.
The Build with AI hub collects the other guides for choosing a next project.