Press Ctrl+U on Windows or Linux in Chrome and Firefox. On a Mac, Chrome uses Command+Option+U and Firefox uses Command+U. You can also right-click an empty part of the page and choose View Page Source. Safari first needs its developer features switched on in Settings, under Advanced.
| Browser | Windows or Linux | Mac |
|---|---|---|
| Chrome | Ctrl+U | Command+Option+U |
| Firefox | Ctrl+U | Command+U |
| Safari | Not available | Turn on Show features for web developers first (Settings, Advanced) |
| Any of the above | Right-click the page, then View Page Source | Right-click (or Control-click) the page |
Updated
Page source is the HTML file the server sent before any scripts ran. It tells you which title and description a page uses, which tracking tags it loads, and where its images live. That makes it the quickest way to check your own site after an edit, or to see how a page you admire is put together.
Paste HTML you copied from View Page Source. It stays in your browser; nothing is uploaded or fetched.
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <title>Harbour Bakery | Fresh bread daily</title>
5 <meta name="description" content="Sourdough, pastries and cakes baked every morning.">
6 <meta property="og:image" content="https://example.com/loaf.jpg">
7 <script async src="https://example.com/analytics.js"></script>
8 </head>
9 <body>
10 <a href="/menu">Menu</a> <a href="/contact">Contact</a>
11 <img src="/loaf.jpg" alt="Sourdough loaf">
12 </body>
13 </html>| Method | Shows | Can edit | Best for |
|---|---|---|---|
| View Page Source | The HTML the server sent | No | Checking titles, meta tags and tracking scripts |
| Inspect (developer tools) | The live page after scripts ran | Yes, temporarily | Finding which code draws a button or image |
| view-source: in the address bar (Firefox) | Same as View Page Source | No | Linking to a line, like #line100 |
Press Ctrl+F (Command+F on Mac) in the source tab and search for these to find the parts that matter most.
Each line is something to type into find, followed by what it locates.
<title the page title in search results
name="description" the snippet text under the title
og:image the picture used in link previews
rel="canonical" the address search engines should index
GTM- a Google Tag Manager container
noindex a tag that keeps the page out of search
Near the top, inside <head>, you will find the <title> and <meta name="description">, the text search results show. Further down are og: tags that control link previews on social media, and the scripts for analytics or tag managers.
If a change you made in your site editor does not appear here, the page may be cached. Reload once, then check again.
Copyright protects the way something is expressed, not the idea behind it. A layout idea or a common technique is free to use; someone's photos, written copy and illustrations are not, unless their licence says so.
View Page Source shows the original file from the server. Inspect opens the browser's developer tools, where Chrome's docs explain the DOM tree shows the page's current state, which differs from the HTML once JavaScript adds, removes or edits parts of it.
You can read and learn from it. Reusing it is another matter: the US Copyright Office says original writing, artwork and photographs on a website may be protected. Copyright does not cover ideas, systems or methods, so learn the technique and write your own version. This is general information, not legal advice.
In Safari it stays hidden until you tick Show features for web developers under Settings, Advanced. On a managed work or school computer, an administrator may have switched developer tools off; ask them.
No. The server runs that code and sends only the resulting HTML, CSS and JavaScript. Nothing in the page source reveals what produced it.
Related: Why your website says Not secure, How to add Google Tag Manager, On-page SEO checklist, Social media image sizes.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.