On this page7
Step by step
Map the sections
List the header, hero, cards and footer. Mark which items are links, buttons or form fields.
Note the capture size
Record the image size and whether it’s a crop. A resized image means one pixel may not equal one CSS pixel.
Check the live page
If it exists, inspect fonts, colors and widths. If not, label fonts and breakpoints as guesses.
Build one section first
Use normal flow, grid or flex with set widths, padding and gaps. Its pattern guides the rest.
Compare the result
Check it at the reference width, then at a narrow width. Log every difference.
What a screenshot can and can’t tell you
Mark text that is too small or cropped to read instead of inventing copy. Ask for the original logo or illustration rather than recreating a substitute.
| In the screenshot | Not in the screenshot |
|---|---|
| Text, order and hierarchy | Semantic markup and source code |
| Approximate sizes and colors | Exact CSS values, especially if the image was resized |
| One state at one width | Hover, focus, menus, errors and other widths |
| Images as pixels | The original asset files |

Use the live page when it exists
Inspect the element and its parent to check fonts, colors, width and layout rules. Sitepeel’s Inspect tool collects an element’s rendered HTML and CSS, and Design MD records the visual rules.
Keep the screenshot as the visual target and the collected values as evidence. Work only with assets you are allowed to use.
A flexible starting layout
This original two-column example stacks at narrow widths. Open it in a browser, resize it and replace the copy. Its values are example choices, not measurements of your screenshot.
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Responsive reference example</title>
<style>
* { box-sizing: border-box; }
body { margin: 0; font: 1rem/1.6 system-ui, sans-serif; color: #202020; background: #f5f3ee; }
main { width: min(100% - 2rem, 68rem); margin: 3rem auto; }
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: center; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin: 0 0 1rem; overflow-wrap: anywhere; }
p { max-width: 48ch; }
.action { display: inline-block; padding: .75rem 1rem; border-radius: .5rem; background: #202020; color: white; }
a:focus-visible { outline: 3px solid #66509a; outline-offset: 4px; }
aside { padding: 1.5rem; background: #e5ddf0; border-radius: 1rem; }
#details { margin-top: 3rem; }
@media (max-width: 42rem) { .hero { grid-template-columns: 1fr; } }
</style>
<main>
<section class="hero" aria-labelledby="title">
<div>
<h1 id="title">Make room for your next idea.</h1>
<p>A small reference layout with real text, flexible columns and a clear next step.</p>
<a class="action" href="#details">Explore the example</a>
</div>
<aside aria-label="Example design notes">
<h2>What to compare</h2>
<ul><li>Heading wrap</li><li>Column spacing</li><li>Narrow-screen order</li></ul>
</aside>
</section>
<section id="details"><h2>Build on the structure</h2><p>Replace these example choices with your own reviewed content and design values.</p></section>
</main>
</html>Brief an AI assistant
Name the framework, the section and the evidence the assistant may use. Ask it to list unclear details first. A prompt that demands an exact clone without assets or behavior invites confident guesses.
Implement the hero section shown in the attached screenshot in [framework].
Evidence:
- Screenshot size and capture viewport: [known values or unknown].
- Verified design notes: [attach notes or DESIGN.md].
- Approved copy and assets: [provide them].
Use semantic HTML and a flexible layout. At narrow widths, keep the content readable and preserve its logical order. Do not invent customer logos, testimonials or interaction behavior.
First list unclear details. Then implement the section and explain the chosen layout rules. Separate measured values from assumptions. Include the exact steps to preview it and a checklist for visual and keyboard review.How to compare the result
- Match the reference width and wait for fonts and images to load
- Compare container edges, columns, heading wraps and section gaps first
- Fix one cause instead of adding several unrelated margins
- Test a narrow width, a longer heading and keyboard navigation
- Try every link, button and form; a screenshot proves none of them work
- Log each difference as verified, intentional change or unresolved
Questions
Can a screenshot reveal the original HTML and CSS?
No. It records rendered pixels. Code rebuilt from it uses inferred structure unless you also have the live page or the source project.
Can AI turn a screenshot into code?
Yes, an AI assistant can draft HTML and CSS from a screenshot. It has to guess structure, fonts and behavior, so give it real copy, assets and design notes, then review the result at several widths.
Why does my page only match the screenshot at one width?
The code probably copied fixed coordinates instead of layout relationships. Review container sizes, grid or flex rules, long text and the order on narrow screens.




