How to View the HTML Source in Firefox

Viewing the HTML source of a webpage is one of the easiest ways to learn HTML. If you see something on a website and want to know how the site designer did it, view the source. If you just like the layout, view the source. It’s a great way for beginners to learn HTML.

View HTML to Learn

Source files can be complicated. There will probably be a lot of CSS and script files along with the HTML, so don’t get frustrated if you can’t figure out what’s going on immediately.

Viewing the HTML source is just the first step. After that, you can use a Firefox Web Developer extension to look at the CSS and scripts, as well as inspect specific elements of the HTML.

How to View a Site's Source Code

  1. Open Firefox.
  2. Go to the webpage you want to examine.
  3. Click on the Tools menu in the top menu bar and go to the Web Developer section.
  4. Click on Page Source to open a text window with the HTML source code of the page you’re looking at.

Tips

Firefox provides a couple of other ways to bring up the page source screen:

  • On most web pages, you can also view the source by right-clicking on the page (not on an image) and choosing View Page Source.
  • Firefox has a keyboard shortcut for viewing the HTML source. Hold down the Control key in Windows or the Command key on a Mac and type U.