Export HTML & CSS
Click any element on a web page and get clean HTML and CSS that looks the same. Copy it, download it or open it in CodePen.
- Runs in your browser
- Opens in a panel on the page
Copy HTML and CSS of any element on a website
You spot a pricing table, a card or a navigation bar you like, and you want to see how it is built. Opening DevTools and copying styles rule by rule takes ages, and the result rarely looks right once you paste it somewhere else. Export HTML & CSS lets you copy HTML and CSS of any element in one click: point at it, click it, and you get code that reproduces it.
Code you can actually read
The export is not a dump of every computed property. DevToolkit keeps only the styles that change how the element looks and leaves out what the browser does by default. Where it can, it writes values the way a person would, such as auto, 50% or repeat(2, 1fr), instead of fixed pixels. Repeated styles are grouped into shared classes, shorthands are folded together, and ::before and ::after pseudo-elements get their own rules.
Checked against the original
Before you see the code, DevToolkit draws the copy next to the page and measures every box against the original. Where a size does not match, it adds the width or height needed to fix it. That check is why the exported element looks like the one on the page, not a rough approximation of it.
Handles the awkward parts
Modern sites are full of things that break simple copy tools. The exporter flattens open shadow DOM and web components into plain HTML, replaces SVG sprite references with the actual shapes, turns canvas drawings into images, wraps table rows in the table tags HTML needs, and makes every image and link address absolute so they still load after you move the code.
Use it your way
Choose CSS with classes, or inline styles if you are pasting into an email template or a page builder. Copy the HTML and CSS separately, download a complete HTML file, or send the element to CodePen in one click to start experimenting.
Good to know
The export captures how the element looks at that moment. Hover effects, animations and media queries from the original stylesheet are not included, fonts are listed so you can add them yourself, and embedded frames keep only their address. Exports are limited to 2,000 elements to keep them fast. The code is made in your browser. It is only sent to CodePen when you press the CodePen button.
Tip: Press Esc at any time to stop picking and close the export panel.
How to copy HTML and CSS from a website
-
Start picking
Click Export HTML & CSS in DevToolkit, then move your mouse over the page. Elements highlight as you go.
-
Click the element
Click the part you want. Its HTML and CSS appear in a panel on the page.
-
Copy or export
Copy the code, download it as an HTML file or open it in CodePen. Press Esc to stop.
What you can do with Export HTML & CSS
-
One-click export
Point, click and get the HTML and CSS of any element on any site.
-
Clean, readable CSS
Only the styles that matter, written with real values like auto, % and grid repeat().
-
Verified match
The copy is measured against the original and sizes are fixed where needed.
-
Classes or inline styles
Pick the output that suits a codebase, an email or a page builder.
-
Open in CodePen
Send the element to a new CodePen pen and start editing right away.
-
Modern markup handled
Shadow DOM, web components, SVG sprites, canvas and tables all come out as plain HTML.
Export HTML & CSS questions
Is Export HTML & CSS free?
It is part of DevToolkit Pro, a one-time payment from $25 with no subscription. The free CSS Inspector lets anyone view an element's computed styles.
Does it include hover effects and responsive styles?
No. It exports how the element looks at the moment you click it. Hover states, animations and media queries from the original stylesheet are not included.
Are fonts included in the export?
The fonts the element uses are listed, but the font files are not embedded. Add them from Google Fonts or your own files, and use Font Detector to find and download them.
Is it legal to copy code from other websites?
Studying how something is built is a normal part of web development. Reusing someone else's design or code in your own product may need their permission, so treat exports as a reference unless you own the site or have the right to reuse it.
Is the code sent anywhere?
No. The code is made inside your browser. It only leaves your computer if you press the CodePen button, which sends the element's HTML, CSS and the page title to CodePen.
Try Export HTML & CSS today
Install DevToolkit free, then unlock every Pro tool with one payment. No subscription.