Turn a Figma design into semantic HTML and responsive CSS
Convert a Figma design description into semantic HTML and mobile-first CSS with design tokens, fluid typography, optimized images and a list of open questions for the designer. Designed for ChatGPT, Claude, Gemini and Microsoft Copilot. It includes 4 customizable variables and you can copy it for free in one click.
Intermediate · Code · Pending editorial review
Prompt
Act as a senior frontend developer who turns designs into faithful, accessible and maintainable HTML and CSS.
Context:
- Design description: {{design}}
- Reference sizes and breakpoints: {{breakpoints}}
- CSS approach: {{css_approach}}
- Browsers to support: {{browsers}}
Before coding, list what the design does not define (hover and focus states, mobile behavior, long text, empty states) and ask me whatever is essential.
Deliverables:
1. The document outline: landmarks (header, nav, main, footer), heading hierarchy and element choices (button vs link, lists, figure).
2. Tokens extracted from the design as custom properties: colors, spacing, radii, shadows and a type scale, with fluid typography using clamp().
3. The complete semantic HTML for the section or page.
4. Mobile-first CSS with Grid and Flexbox, no fixed heights or magic numbers, with :hover, :focus-visible and disabled states.
5. Images with width and height, srcset and sizes, loading="lazy" except for the hero image, and useful alt text or empty alt when decorative.
6. A contrast check of the design colors, with alternatives for any that fail WCAG AA.
7. A list of decisions you made where the design was ambiguous, to review with the designer.
Constraints:
- No needlessly nested divs and no class names that describe looks instead of purpose, unless using Tailwind.
- Do not invent copy or data: use [FILL IN] where copy is missing.
- Respect prefers-reduced-motion if you add transitions.
Output format: outline, tokens, HTML and CSS in separate blocks, and the decision list at the end.How to use it
- Describe the design section by section: layout, hex colors, fonts, sizes and spacing you see in Figma. 2. State the breakpoints and the project’s CSS approach. 3. Compare the result with the design at several widths and ask for specific tweaks.
Usage example
Design: hero with headline on the left and image on the right, three service cards and a footer with a newsletter form · Breakpoints: 375, 768 and 1280 px · Approach: modern CSS · Browsers: last two versions.
Sample output
Outline
header > nav · main > section.hero (h1 + p + button-styled link + img) · section.services (h2 + ul of three li with h3) · footer (newsletter form with a visible label).
Tokens and hero (styles.css)
:root {
--color-bg: #F6F1EA;
--color-primary: #1F4D3A;
--color-text: #1B1B1B;
--space-m: 1.5rem;
--space-l: clamp(2rem, 5vw, 4rem);
--radius: 0.75rem;
--text-headline: clamp(2rem, 1.2rem + 3.5vw, 3rem); /* 48 px on desktop */
font-family: 'Inter', system-ui, sans-serif;
}
.hero {
display: grid;
gap: var(--space-m);
padding-block: var(--space-l);
background: var(--color-bg);
}
.hero h1 { font-size: var(--text-headline); line-height: 1.1; }
@media (min-width: 48rem) {
.hero { grid-template-columns: 1fr 1fr; align-items: center; }
}
.button {
display: inline-block;
padding: 0.75rem 1.5rem;
border-radius: var(--radius);
background: var(--color-primary);
color: #fff;
}
.button:hover { background: color-mix(in srgb, var(--color-primary) 85%, black); }
.button:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
Contrast
| Pair | Ratio | WCAG AA |
|---|---|---|
| White on #1F4D3A | 9.6:1 | ✓ |
| #1F4D3A on #F6F1EA | 8.6:1 | ✓ |
Decision to review: the design has no hover state; I darkened the green by 15%…
Key facts
- Category
- Programming & development · HTML & CSS
- Output type
- Code
- Level
- Intermediate
- Designed for
- ChatGPT, Claude, Gemini and Microsoft Copilot
- Verified in
- Pending editorial verification
- Variables
- Design description, Breakpoints, CSS approach and Browsers
- Language
- English
- Price
- Free, no sign-up
- Updated
- Nov 7, 2026
Frequently asked questions
Can I just paste a Figma link?
Most assistants cannot open Figma files. Describe the design with sizes and colors, or attach screenshots if your tool accepts images; the prompt works with either.
Why start with the outline instead of the CSS?
Because a good semantic structure makes accessibility, SEO and maintenance easier. When the HTML is right, the CSS is simpler and design changes cost less.
What is this prompt for?
Convert a Figma design description into semantic HTML and mobile-first CSS with design tokens, fluid typography, optimized images and a list of open questions for the designer.
Which AI tools does it work with?
It is designed for ChatGPT, Claude, Gemini and Microsoft Copilot. We have not verified it in these tools yet, so results may vary between them.
How do I customize the prompt?
Click “Customize” and fill in the variables (Design description, Breakpoints, CSS approach and Browsers). The text updates instantly and you can then copy it in one click. Values are stored only in your browser.
Do I need experience to use it?
It is intermediate: it helps to know the topic so you can provide good context and review the result critically.
Is this prompt free?
Yes. Every HomeCasa Prompts prompt is free, with no sign-up or subscription. You can also use them in professional projects.
Can I trust the AI output?
Treat it as a high-quality draft: always check data, figures and important claims before publishing or making decisions.