View the source code for a webpage

This information applies to Windows Internet Explorer 7 and Windows Internet Explorer 8.

Webpages are created using code that tells your web browser what to display and how to display it. By viewing a webpage's source code, you can see how the webpage is structured, help uncover misleading links, or see where a web form is really sending your information. When you view source code, it is displayed in Notepad.

To view a webpage's source code

  1. Open Internet Explorer by clicking the Start button Picture of the Start button, and then clicking Internet Explorer.

  2. Browse to the webpage you want to view.

  3. Right-click the background or text of a webpage or frame.

  4. Click View Source.


  • If you have protected mode turned on when you view the source of a webpage, Internet Explorer 7 will prompt you for permission to open the file. Make sure that the name of the program displayed on the prompt is Notepad and the publisher is Microsoft Windows before allowing it to open.

  • If the page was created with frames, you'll have to repeat the steps above on each frame to see all of the source code for the webpage. To see the source for the overall frame that contains the individual windows, press ALT+V to display the View menu, and then click Source.