[{"data":1,"prerenderedAt":321,"buildId":322},["ShallowReactive",2],{"page-\u002Fbuild\u002Fvibe-coding-tutorial":3},{"id":4,"title":5,"body":6,"description":303,"extension":304,"how_to_steps":305,"hub":288,"meta":306,"navigation":307,"path":308,"primary_keyword":309,"published_at":310,"schema_types":311,"seo":315,"status":316,"stem":317,"updated_at":318,"wave":319,"__hash__":320},"pages\u002Fbuild\u002Fvibe-coding-tutorial.md","Vibe Coding Tutorial: Your First Project Start to Finish",{"type":7,"value":8,"toc":291},"minimark",[9,13,18,21,24,28,40,49,53,56,66,69,77,81,102,129,132,148,158,163,185,198,202,218,232,235,241,259,263,269,275],[10,11,12],"p",{},"In this vibe coding tutorial, you'll make a seed swap packing card in one HTML file.\nA link takes you to the packing list, and a section called \"How to label a packet\" opens when you activate it.\nYou'll prompt an AI for a draft, compare it with a working example, and fix a broken link by matching two lines of HTML.\nYou can do the whole exercise without publishing anything.",[14,15,17],"h2",{"id":16},"the-project-we-will-build","The project we will build",[10,19,20],{},"The card answers a question someone might have while sorting packets at a kitchen table: what should I write on the envelope?\nIt opens with a title and a short introduction, then gives you a packing list and a sample label.\nThere's no event registration or record of which seeds people bring.\nIf you share the page, everyone reads the same instructions.",[10,22,23],{},"At the end of the exercise, the browser tab should say \"Seed swap packing card.\"\nThe heading on the page should say \"Pack for the seed swap.\"\nThe packing list should show paper envelopes and a pen, in that order.\nThe sample label should be hidden at first and visible only after you open the section.\nKeep those expected results handy while you review the first draft.\nThey give you a way to tell if the draft works even if the tool chose different colors or spacing.",[14,25,27],{"id":26},"pick-your-tool","Pick your tool",[10,29,30,31,35,36,39],{},"Use an AI chat and a plain text editor if you'd rather paste the file yourself.\nIf you'd rather have the tool save it for you, use a coding agent that lets you review edits.\nOpen an empty folder called ",[32,33,34],"code",{},"seed-card"," and use only that folder for the exercise.\nFor the chat path, save a new file named ",[32,37,38],{},"index.html"," there and choose plain text if your editor asks for a format.\nFor the agent path, ask it to create that one file and keep permission to run commands or publish turned off.",[10,41,42,43,45,46,48],{},"You need a browser as well as an editor.\nLeave the editor open when you double-click ",[32,44,38],{}," in your file manager to view it.\nYour browser displays the saved file and your editor changes the file itself.\nIf the browser shows tags instead of a page, check that the full filename is ",[32,47,38],{}," and that the file contains plain HTML, without Markdown backticks or the AI's introduction.\nOn a computer that hides file extensions, use your file manager's file details to check the full name.",[14,50,52],{"id":51},"the-first-prompt","The first prompt",[10,54,55],{},"Paste the prompt below into your tool.\nIt gives the tool the actual wording and tells it how the two controls should behave.\nThat leaves you with a small draft you can compare against the instructions.",[57,58,64],"pre",{"className":59,"code":61,"language":62,"meta":63},[60],"language-text","Write one index.html file for a seed swap packing card.\nSet the browser tab title to \"Seed swap packing card\".\nUse \"Pack for the seed swap\" as the visible main heading.\nAdd this introduction: \"Bring seeds in dry paper envelopes you can label.\"\nAdd a link named \"Jump to the packing list\" with href=\"#packing-list\".\nGive the \"Packing list\" heading id=\"packing-list\".\nList \"Paper envelopes\" and \"A pen\" as unordered list items.\nBelow the list, use HTML details and summary with no open attribute.\nUse \"How to label a packet\" as the summary.\nInside the disclosure, put \"Example: Calendula, collected October 2026.\"\nPut any CSS in the head of the file and use no scripts, packages, or external assets.\nUse a layout that wraps on phones and keep the browser's visible keyboard focus.\nReturn the complete file and do not publish it.\n","text","",[32,65,61],{"__ignoreMap":63},[10,67,68],{},"If the tool writes several files or tells you to install something, ask for the single file again.\nSave and open the draft even if you plan to adjust the colors later.\nIf the draft doesn't run or you want a known version to compare against, the example below is the complete file.\nYou can paste it as-is and continue.",[57,70,75],{"className":71,"code":73,"language":74,"meta":63},[72],"language-html","\u003C!doctype html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n  \u003Cmeta charset=\"utf-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  \u003Ctitle>Seed swap packing card\u003C\u002Ftitle>\n  \u003Cstyle>\n    body {\n      margin: 0;\n      font-family: system-ui, sans-serif;\n      line-height: 1.6;\n      color: #1f2d24;\n      background: #f7faf5;\n    }\n    main {\n      max-width: 38rem;\n      margin: 0 auto;\n      padding: 1.25rem;\n    }\n    a {\n      color: #174f34;\n    }\n    details {\n      border: 1px solid #56685c;\n      padding: 0.75rem;\n    }\n    a:focus-visible, summary:focus-visible {\n      outline: 2px solid #174f34;\n      outline-offset: 3px;\n    }\n  \u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cmain>\n    \u003Ch1>Pack for the seed swap\u003C\u002Fh1>\n    \u003Cp>Bring seeds in dry paper envelopes you can label.\u003C\u002Fp>\n    \u003Cp>\u003Ca href=\"#packing-list\">Jump to the packing list\u003C\u002Fa>\u003C\u002Fp>\n    \u003Ch2 id=\"packing-list\">Packing list\u003C\u002Fh2>\n    \u003Cul>\n      \u003Cli>Paper envelopes\u003C\u002Fli>\n      \u003Cli>A pen\u003C\u002Fli>\n    \u003C\u002Ful>\n    \u003Cdetails>\n      \u003Csummary>How to label a packet\u003C\u002Fsummary>\n      \u003Cp>Example: Calendula, collected October 2026.\u003C\u002Fp>\n    \u003C\u002Fdetails>\n  \u003C\u002Fmain>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html",[32,76,73],{"__ignoreMap":63},[14,78,80],{"id":79},"reading-the-output","Reading the output",[10,82,83,84,87,88,91,92,94,95,97,98,101],{},"Start at the top of the file and find the ",[32,85,86],{},"head"," and ",[32,89,90],{},"body",".\nThe ",[32,93,86],{}," holds the tab title and the style rules.\nThe ",[32,96,90],{}," holds what people read on the page.\nChange a word in the visible heading and save the file.\nReload the browser tab to see the change.\nLook at the tab as well as the heading to see which one changed, then restore the original wording.\nYou can repeat that experiment with the ",[32,99,100],{},"title"," if you want to check that the two pieces of text are independent.",[10,103,104,105,108,109,112,113,116,117,120,121,124,125,128],{},"Find the ",[32,106,107],{},"main"," element, which wraps the card's content.\nInside it, ",[32,110,111],{},"ul"," groups list items where order doesn't matter, and each ",[32,114,115],{},"li"," holds one item.\nThe ",[32,118,119],{},"details"," element holds the part you can open, and ",[32,122,123],{},"summary"," gives that control its label.\nBecause the file leaves out the ",[32,126,127],{},"open"," attribute, a fresh load starts with the details closed.\nThe browser handles opening the section, so you don't need a script to make it work.",[10,130,131],{},"Now check the page from a fresh tab with the mouse set aside:",[133,134,135,142,145],"ol",{},[115,136,137,138,141],{},"Press Tab until you reach \"Jump to the packing list.\"\nFind the visible focus outline, then press Enter and look for ",[32,139,140],{},"#packing-list"," at the end of the address.\nOn a short page, the heading may already be visible and the page may barely move.",[115,143,144],{},"Press Tab until \"How to label a packet\" has focus, or use Shift+Tab if you pass it.\nPress Enter to reveal the sentence about calendula.\nPress Enter again and check that the sentence disappears while the summary is still available.",[115,146,147],{},"Make the window narrow or open your browser's phone preview.\nCheck that the heading can wrap and that the list and opened label can be read without sideways scrolling.",[10,149,150,151,154,155,157],{},"If you want to find the source of a visible detail, right-click the packing heading and choose Inspect.\nThe inspector shows the elements the browser built, including the heading's ",[32,152,153],{},"id",".\nThe style pane shows rules applied to the element you select.\nYou can try a color there, but changes in the inspector are temporary, so save any change you want to keep in ",[32,156,38],{},".",[159,160,162],"h3",{"id":161},"try-one-style-change","Try one style change",[10,164,165,166,169,170,173,174,177,178,181,182,184],{},"In the example, ",[32,167,168],{},"max-width: 38rem"," gives the card room to get narrower while limiting how wide the text gets on a large screen.\nIf your draft uses ",[32,171,172],{},"width"," with a fixed value instead, the card may stick out past the edge of a phone screen.\nOn a wide screen, try changing the example's ",[32,175,176],{},"38rem"," to ",[32,179,180],{},"24rem"," and reload.\nThe card should have shorter lines, while the list and the label feature should still work the same way.\nRestore ",[32,183,176],{}," after the test, or keep the narrower version if you can read it comfortably with the label open.",[10,186,187,188,191,192,194,195,197],{},"Look for ",[32,189,190],{},"padding"," on ",[32,193,107],{}," if the text feels too close to the edge.\nPadding adds space inside the card.\nIf you change it, test at both large and small widths and open the label at each width.\nChecking only the closed card tells you nothing about whether the revealed text fits.\nIf 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.\nFor instance, ",[32,196,107],{}," before the opening brace tells you that the rules inside apply to the element that wraps the card.",[14,199,201],{"id":200},"fixing-what-the-ai-got-wrong","Fixing what the AI got wrong",[10,203,204,205,207,208,177,211,214,215,217],{},"A link can look right and still point to a name that isn't in the document.\nTo practice that failure on the working version, save a backup outside the project folder and change only the heading's ",[32,206,153],{}," from ",[32,209,210],{},"packing-list",[32,212,213],{},"packing",".\nOpen the saved file in a new tab so no fragment from a previous test is in the address.\nActivate the link and notice that the address can still end in ",[32,216,140],{},", even though there is no matching target.\nThe address alone didn't prove the link worked.",[10,219,220,221,223,224,227,228,231],{},"Search for ",[32,222,210],{}," in the editor.\nWith the deliberate mistake, you'll find the name on the link but not on the heading.\nChange the heading back to ",[32,225,226],{},"id=\"packing-list\""," and save.\nOpen a fresh tab again and activate the link.\nThe name after ",[32,229,230],{},"#"," now matches a single element in the file.\nIf the heading is already on screen, narrow the window or increase zoom so you can see the jump more easily.",[10,233,234],{},"If your AI draft has that problem, give the tool the observed mismatch instead of asking it to redo the page.\nYou can also apply the same one-line fix yourself.",[57,236,239],{"className":237,"code":238,"language":62,"meta":63},[60],"In index.html the packing link points to #packing-list, but the heading has id=\"packing\".\nChange only that heading's id to packing-list and leave the link and other markup unchanged.\nShow the before and after lines.\n",[32,240,238],{"__ignoreMap":63},[10,242,243,244,246,247,249,250,253,254,256,257,157],{},"Compare those two lines against your saved file and test the link and the disclosure again.\nIf the disclosure is open on a fresh load when you wanted it closed, look for an ",[32,245,127],{}," attribute on the ",[32,248,119],{}," tag and remove the attribute entirely.\nWriting ",[32,251,252],{},"open=\"false\""," still leaves the attribute present.\nIf 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.\nIf clicking the summary works but you can't reach it by pressing Tab, inspect what the draft used for the control.\nA line of styled text can look like the example without being a ",[32,255,123],{}," element at all.\nCompare it with the working file and make sure the summary is the first child of ",[32,258,119],{},[14,260,262],{"id":261},"publishing","Publishing",[10,264,265,266,268],{},"For the local finish, keep the checked ",[32,267,38],{}," and open it again after closing the editor.\nIf the link has a matching target and you can open and close the label with the keyboard, you've finished the example.\nYou 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.",[10,270,271,272,274],{},"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.\nUpload a clean folder containing only ",[32,273,38],{}," at its top level, or zip that folder's contents if the host asks for an archive.\nUse the address the host gives you, not the file address from your browser.\nIn a private window, check that the live tab title is correct and run the link and disclosure tests again.\nA 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.",[10,276,277,278,280,281,91,286,290],{},"If the host shows a missing-page message, check for an extra folder around ",[32,279,38],{}," in what you uploaded.\nFor a bigger example that includes a separate stylesheet and a release checklist, read ",[282,283,285],"a",{"href":284},"\u002Fbuild\u002Fhow-to-vibe-code-a-website","how to vibe code a website",[282,287,289],{"href":288},"\u002Fbuild","Build with AI hub"," collects the other guides for choosing a next project.",{"title":63,"searchDepth":292,"depth":292,"links":293},2,[294,295,296,297,301,302],{"id":16,"depth":292,"text":17},{"id":26,"depth":292,"text":27},{"id":51,"depth":292,"text":52},{"id":79,"depth":292,"text":80,"children":298},[299],{"id":161,"depth":300,"text":162},3,{"id":200,"depth":292,"text":201},{"id":261,"depth":292,"text":262},"A hands-on vibe coding tutorial: pick a tool, describe your project, review what the AI wrote, and ship it. Beginner pace, real outcome.","md",[26,51,79,200,261],{},true,"\u002Fbuild\u002Fvibe-coding-tutorial","vibe coding tutorial","2026-12-01T05:35:41Z",[312,313,314],"Article","BreadcrumbList","HowTo",{"title":5,"description":303},"draft","build\u002Fvibe-coding-tutorial",null,"1","UcBRsHg1btIOiZTNXAtDRE8rcQxCQI9j2IzImpp4hVA",1796185435707,"a1d53563-3a78-4678-8315-e5bd6a5bd80c"]