Outilo Outilo

How do you get the HTML of a web page?

Edited by Outilo Reviewed by Yoann Begue Last verified on 24/05/2026
Quick answer

To get the HTML of a web page, start with Ctrl+U or right-click and choose “View page source”. If the page is generated with JavaScript, open the browser inspector instead, select the body or html tag, and copy its outer HTML.

Explanation

There are two ways to get a page’s HTML, and they do not always return the same result. The page source shows the initial HTML sent by the server. This is enough for a simple or static page. The inspector shows the current DOM, meaning the structure after JavaScript may have changed the page. On a modern app, an e-commerce website or a dynamically loaded page, this second method is often more reliable for getting the content that is actually visible before converting it to Markdown or analyzing it with AI.

Formula / method

Quick method:

  • Open the page in your browser.
  • Press Ctrl+U or right-click → “View page source”.
  • Copy the displayed HTML.

Reliable method for dynamic pages:

  • Open developer tools.
  • Go to the Elements / Inspector panel.
  • Select body or html.
  • Right-click → Copy → Copy outerHTML.
  • Paste the result into your HTML to Markdown converter.

Concrete example

If you copy the source code of a product page and the converter retrieves almost nothing, the content is probably added after load by JavaScript. In that case, copy the HTML from the inspector instead of the page source.

Common mistake

Do not confuse initial HTML with the displayed DOM. Initial HTML can be incomplete on dynamic pages, while the DOM often contains the content that is actually visible. Also be careful with private or protected content: only copy what you are allowed to use.


Similar questions