View the Source HTML Code of a Web Page

You can see the HTML code behind any web page by right-clicking on the page and selecting "View source". This will display the HTML code used to produce the page, which can be very helpful for budding designers who want to check out how certain layouts or effects are achieved. Note, however, that the page source you can view from a browser is only that which contains the HTML presentation & other supporting code, not the server-side code which may have been used to generate a dynamic page.

In the source you may also see JavaScript and CSS styles in the header and other parts of the page. Very often JavaScript and CSS will not be directly embedded in a web page and instead will be linked to. You may still view the source of such scripts and styles by following the URL displayed in the link.

If a site uses frames, viewing the source will probably not reveal the code you are looking for, but that which governs the layout of the frameset. However, in Firefox, for example, you can specify which frame you want to view the source for.