Skip to content

How to see the HTML behind a web page

Behind every web page is a computer language called HTML. Unlike documents made by applications, which don’t really allow you to see the code behind them, the code which makes up a web page is open to all. As I occasionally mention some of the component ‘tags’ (such as titles and headlines), I thought it might be worth providing a short guide how to physically see the HTML code of a web page in your web browser.

The main thing to know is that by viewing it in your browser, you’re just exposing the naked HTML code, which the browser interprets to turn a text document into a colourful, laid-out web page. From a browser, you can’t change it, delete it or otherwise do any harm. So don’t worry.

Showing the HTML is simply a menu selection in most browsers. But the selection does vary. There’s also normally a shortcut key combination, which is what we’ll use here. So, bring up a page from your (or anyone else’s!) website. Then, depending on your browser, do the following:

If you’re using Windows, with Microsoft’s Internet Explorer or Edge browsers, Firefox, Chrome or Opera, hit Ctrl-U. With Safari, hit Command + Option + U. If you’re using a Mac, with Chrome or Safari hit Command + Option + U or with Firefox hit Ctrl-U.

Then you should see the HTML behind the page. Once upon a time, you’d have just seen some very basic tags ‘marking up’ the text, but with today’s sophisticated web pages you’ll probably see all sorts of more advanced coding, including ‘scripts’ and more. However, you should be able to see things such as the page title (surrounded by ‘title’ tags) and the main body copy. Take a look; it’s worth getting to know.