← All prompts

Semantic HTML Skeleton

Websites

Works in ChatGPT, Claude, Gemini and Cursor. Free to use.

Semantic HTML Skeleton

What it does

Writes a clean HTML5 page structure using semantic tags like header, nav, main, section and footer, with divs only where needed. The result is easy to read, works well with screen readers, and doesn’t jump around while it loads.

When to use it

  • You’re starting a new page and want the structure right before any styling
  • You’ve taken over a page built from piles of divs and want to clean it up
  • You care about accessibility and Core Web Vitals as well as looks

The prompt

Act as a front-end developer who writes semantic, accessible HTML5. Rules: Use semantic elements (header, nav, main, section, article, aside, footer) and reserve <div> only for genuine styling wrappers with no semantic meaning. Every image gets alt text. Headings nest in order (one <h1>, then h2s, etc.). Interactive elements are real buttons/links, not clickable divs. Don't inline styles or scripts. No claims about speed you can't prove, only clean structure.

What the page is for: [DESCRIBE THE PAGE]
The main sections it needs, in order: [LIST THEM]
Any must-have elements: [NAV ITEMS, FORM, HERO, FOOTER LINKS, ETC.]

Give me:
1. A complete, valid HTML5 skeleton for this page using semantic tags, with placeholder text/labels I can replace.
2. Comments marking each region so a beginner can see the structure.
3. Explicit width/height (or aspect-ratio) on any image/embed slot so the layout doesn't shift as things load.
4. A short note on which ARIA attributes (if any) this structure needs, and which it doesn't, because native semantic tags already cover them.
5. The one accessibility check to run before I style it.

Example

This is a made-up case, and we asked the AI to keep its answer short.

What we filled in:

What the page is for: A one-page website for a weekend badminton club in Tampines, Singapore, about 40 members. People find us through a search, check when and where we play, and sign up for a trial session.
The main sections it needs, in order: Hero with the club name and the next session date. About the club. Session times and venue (we play in two community centre halls). Fees (S$8 a session or S$60 a quarter). Photos from recent sessions. Join us form. Footer.
Any must-have elements: Nav with Home, Sessions, Fees, Join. A hero image of the hall. A join form with name, email, mobile number, skill level (beginner, intermediate, advanced) and a message box. A map embed for the venue. Footer with a WhatsApp link, an Instagram link and a short privacy note.

What came back:

1. Complete HTML5 skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>[Club name] | Weekend badminton in Tampines</title>
<meta name="description" content="[One sentence for search results: who you are, where and when you play]">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header><!-- HEADER AND MENU -->
<nav><ul>
<li><a href="#home">Home</a></li>
<li><a href="#sessions">Sessions</a></li>
<li><a href="#fees">Fees</a></li>
<li><a href="#join">Join</a></li>
</ul></nav>
</header>
<main>
<section id="home"><!-- HERO: the only h1 on the page -->
<h1>[Club name]</h1>
<p>Next session: <time datetime="[YYYY-MM-DD]">[Day and date]</time>. <a href="#join">Book a trial session</a></p>
<img src="images/hall.jpg" alt="[Describe the photo, for example: courts set up in the community centre hall]" width="1200" height="600">
</section>
<section id="about"><!-- ABOUT -->
<h2>About the club</h2>
<p>[Who you are, who plays, what a session is like]</p>
</section>
<section id="sessions"><!-- SESSIONS AND VENUE: one h3 per hall. For a map of each hall, copy the iframe line under each one. -->
<h2>Session times and venue</h2>
<h3>[Hall 1 name]</h3>
<p>[Days and times]. [Address]</p>
<h3>[Hall 2 name]</h3>
<p>[Days and times]. [Address]</p>
<iframe src="[Map embed link]" title="Map of [venue name]" width="600" height="400"></iframe>
</section>
<section id="fees"><!-- FEES -->
<h2>Fees</h2>
<ul><li>S$8 a session</li><li>S$60 a quarter</li></ul>
</section>
<section id="photos"><!-- PHOTOS: copy the img line once for each photo -->
<h2>Photos from recent sessions</h2>
<img src="images/session-1.jpg" alt="[What is happening in this photo]" width="800" height="600">
</section>
<section id="join"><!-- JOIN FORM: each label is linked to its field by a matching for and id -->
<h2>Join us for a trial session</h2>
<form action="[Link from your form service]" method="post">
<label for="name">Name</label> <input id="name" name="name" type="text" autocomplete="name" required>
<label for="email">Email</label> <input id="email" name="email" type="email" autocomplete="email" required>
<label for="mobile">Mobile number</label> <input id="mobile" name="mobile" type="tel" autocomplete="tel" required>
<label for="level">Skill level</label> <select id="level" name="level" required>
<option value="">Choose one</option><option>Beginner</option><option>Intermediate</option><option>Advanced</option></select>
<label for="message">Message</label> <textarea id="message" name="message" rows="4"></textarea>
<button type="submit">Send</button>
</form>
</section>
</main>
<footer><!-- FOOTER: contact links and privacy note -->
<p><a href="https://wa.me/[number with country code, digits only]">Message us on WhatsApp</a> <a href="https://www.instagram.com/[your handle]/">See us on Instagram</a></p>
<p>[Privacy note: what the form collects, what you use it for, and how to ask for it to be deleted]</p>
</footer>
</body>
</html>

2. Region comments
Each region opens with a comment in capitals, such as HERO or JOIN FORM, saying what it holds. Browsers never show comments.

3. Width and height on images and embeds
The hero image, the session photo and the map all have width and height set. The browser saves that space before they load, so the text below stays put. Change the numbers to your real sizes, or at least the same shape. In styles.css, give images max-width 100% and height auto so they shrink on small screens. An iframe won't keep its shape that way, so give the map width 100%, height auto and aspect-ratio 3 / 2.

4. ARIA attributes
This page needs no ARIA. Header, nav, main and footer are already landmarks that screen reader users can jump between. Real links and a real button already say what they are. Each label's for matches its field's id, which names the field, and required already says the field must be filled in. The map's title attribute names the iframe. That is plain HTML, not ARIA, but keep it.
Skip role="navigation", role="main" and role="button", aria-label on fields that already have labels, and aria-required next to required. They only repeat what the tags already say. If you ever add a second nav, give each one an aria-label so they can be told apart.

5. The one check before styling
Put the mouse away and use the page with only the keyboard. Press Tab from the top. You should reach each menu link, the trial link, every form field and the Send button in the order they appear, and always see which one is active. Pick a skill level and try to send the form without the mouse. If anything can't be reached, fix the HTML now. Repeat the test after styling, because CSS can hide the focus outline.

Tips

  • Use Fluid CSS System next. This prompt gives you the structure, and that one handles the styling.
  • If you use Astro or React, ask for the same skeleton “as an Astro/React component.”
  • Check the result with a validator like validator.w3.org. Clean structure can still have errors.