Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteTo copy an element’s HTML in Chrome, open DevTools, select the node in the Elements panel, right-click it, choose Copy, then Copy outerHTML. The clipboard result is markup for the selected live DOM node. If you need only the markup inside that element, select it and read $0.innerHTML in the Console instead.
Copy a selected element with Copy outerHTML
- Open the page in Chrome. Navigate to the page containing the element.
- Open DevTools. Right-click the visible element and choose Inspect. Chrome opens DevTools with the corresponding node focused in Elements. You can also open the Command Menu with Ctrl+Shift+P on Windows, Linux or ChromeOS (or Cmd+Shift+P on macOS), type Elements, choose Show Elements, and press Enter. See Chrome’s Elements panel overview.
- Choose the exact node. In the DOM Tree, click the element whose markup you need. Expand parent and child nodes until the selection includes the correct scope.
- Copy its markup. Right-click the selected node, open Copy, and select Copy outerHTML.
- Paste and inspect. Paste into a text editor or code editor. Check the first and last tags and confirm that the copied scope is what you intended.
outerHTML includes the selected element itself: its opening tag, attributes, descendants and closing tag. For example, selecting <article class="post">...</article> copies the <article> wrapper as well as everything inside it.
Copy only the contents with $0.innerHTML
When you want the children of a node but not the node’s own opening and closing tags, use the Console:
- Select the target node in Elements.
- Open the Console panel (or press Esc to open the Console drawer while staying in Elements).
- Run:
$0.innerHTML
Chrome assigns $0 to the node currently selected in Elements. The expression returns that node’s innerHTML, which is the serialized markup of its descendants. To include the selected node itself, run:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
$0.outerHTML
You can copy the returned value from the Console’s output menu, or use JavaScript to place it on the clipboard:
copy($0.innerHTML)
Use copy($0.outerHTML) when you need the complete selected element. The copy() helper is a DevTools Console utility; it does not become part of your site’s JavaScript.
Understand what Chrome is copying
The Elements panel shows the live DOM
Elements is a view of the document tree Chrome has parsed and is currently rendering. Scripts can add, remove or alter nodes after the initial response arrives. Consequently, copied markup represents the selected live DOM at inspection time; it is not automatically the original HTML response or the source file on the server. Chrome’s DOM tutorial explains this distinction in Get started with viewing and changing the DOM.
Markup is not a complete page
Copying a node does not package its external stylesheets, JavaScript files, images, fonts, cookies, event listeners or application state. Relative URLs remain relative, and generated state may disappear when the markup is pasted elsewhere. If you need a reusable page, save the relevant assets and styles separately and adapt links to the new location.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Nested, iframe and shadow content
Select the scope you need before copying. A node inside an <iframe> belongs to that frame’s document, so inspect the frame’s document rather than assuming the parent page contains the same tree. Shadow DOM and other encapsulated content may require selecting the exposed host or inspecting the shadow tree separately. The documented copy workflow does not promise that one operation captures every document or encapsulated subtree.
When Copy outerHTML appears to select the wrong node
Chrome’s accessibility guidance warns: “Copy outerHTML often selects the parent node, instead of the intended node.” If the paste starts with a parent element, do not assume the copy failed.
- Compare the pasted opening and closing tags with the node you selected.
- Search the pasted text for the intended element and verify that its contents are present.
- Re-select the exact node, then use
copy($0.outerHTML)orcopy($0.innerHTML)in Console. - If the parent still appears, copy the child’s returned Console value rather than the context-menu result.
For accessibility-focused navigation details, see Chrome’s Navigate Chrome DevTools with assistive technology.
Choose the right extraction method
| Need | Use | Result |
|---|---|---|
| Selected element plus its wrapper | Copy > Copy outerHTML or $0.outerHTML |
Opening tag, attributes, descendants and closing tag |
| Only children inside the selected element | $0.innerHTML |
Descendant markup without the selected element’s own tags |
| Text with no tags | $0.textContent |
Text content, including text from descendants |
| Original server response | Use the Network panel’s document response or the site’s source workflow | Response bytes, which may differ from the live DOM |
The last row is important: DevTools extraction is a DOM operation, not a request replay. A page rendered by JavaScript can have substantially different markup from the initial response.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Practical checks before you reuse the markup
- Confirm the boundary. Make sure you selected the component rather than a surrounding layout container.
- Look for runtime attributes. Frameworks may add transient IDs, classes or data attributes that are meaningful only during that session.
- Check URLs. Convert relative links and asset paths if the snippet will move to another directory or domain.
- Check state. Expanded menus, validation messages and lazy-loaded items may reflect your current interaction, not the default page state.
- Escape safely. Treat copied content as untrusted input before inserting it into another application, template or database.
- Preserve encoding. Paste into a UTF-8 editor and inspect unusual characters, entities and non-breaking spaces.
Troubleshooting
The Copy menu is missing
Make sure the context menu is opened on a node in the DOM Tree, not on the rendered page or an empty area of DevTools. Select a node first, then right-click its row and open Copy.
The output is empty
An empty innerHTML can be correct for a void element such as <img>, or for a container whose children have not been rendered yet. Try $0.outerHTML, expand the node, and wait for the page to finish loading.
The copied HTML does not include content I can see
The visible content may be painted by CSS, represented by a pseudo-element, located in an iframe, or rendered in a shadow tree. CSS ::before and ::after content is not ordinary child markup. Inspect the relevant document or shadow root and copy the actual node if one exists.
The markup changes after I copy it
Page scripts may continue updating the live DOM. Pause activity by using DevTools breakpoints where appropriate, or immediately run copy($0.outerHTML) after selecting the node and paste the result into a file.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Console output is hard to copy
Use the Console’s output context menu or the copy() helper. For large results, paste directly into a file rather than relying on line wrapping in the DevTools display.
Or skip the browser setup
If your real goal is an automated screenshot or PDF rather than DOM markup, ScreenshotNeo provides a website screenshot API and MCP server. A GET request returns PNG, JPEG, WebP or PDF, while its capture workflow accepts consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before the shot. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed; response headers identify the page verdict and whether it was billed.
Basic cURL request (see the ScreenshotNeo documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The same service offers an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. It also supports full-page and element captures, device presets, custom CSS and JavaScript, waiting rules, request blocking, authentication headers and cookies, geolocation, resizing, caching, signed links, asynchronous webhooks, bulk capture and a usage API.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Automate HTML extraction in your own script
DevTools is ideal for one-off inspection. For repeatable extraction, reproduce the DOM operation in browser automation: load the page, wait for the required selector, evaluate element.outerHTML or element.innerHTML, and save the returned string. Capture the same URL, viewport, authentication state and wait conditions each time so results are comparable. Automation still reads the rendered DOM; it does not turn the result into the original server source.
Frequently asked questions
Frequently Asked Questions
Can I copy the entire page from Elements?
Select the <html> node and use Copy outerHTML for the current document tree. Verify the result because it is the live DOM and may include runtime changes.
What is the keyboard shortcut for Copy outerHTML?
Chrome documents the context-menu path rather than a dedicated shortcut: right-click the node, choose Copy, then Copy outerHTML.
Recommended Free Tools
Does copying HTML include CSS?
No. The operation copies markup only. External stylesheets, inline style behavior, scripts and assets must be handled separately.
Is copied HTML safe to paste into production?
Review and sanitize it first. It can contain user-controlled attributes, event handlers, tracking elements or transient application state.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

