How to Open Source Code on Windows

When viewing the source code of a web page, the information and code processed by the server won’t appear. For example, a search engine processes information on a server and then displays the results on a web page. In other words, you can view the code that makes up the results page, but you cannot view the search engine’s source code.

This rule applies to all server-side scriptsSSI, and programming code. Therefore, you cannot view a scripts source code used in search engines, forums, polls, chat, etc. Also, copying the information from the source code may cause errors or direct you back to the page from which you copied the information.

Chrome

Google Chrome

To view the source code of a web page in Google Chrome, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View page source from the pop-up menu that appears.

View page source in Chrome.

View page source with elements

  1. Open Chrome and navigate the web page whose source code you’d like to view.
  2. Click the Customize and control Google Chrome Chrome settings icon icon in the upper-right corner of the browser window.
  3. From the drop-down menu that appears, select More tools, then select Developer tools.
  4. Click the Elements tab in the top-left corner of the new section that appears at the bottom of the screen.
Elements tab in Chrome.

Tip

In Chrome, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides much more interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page immediately.

Firefox

Mozilla Firefox

To view the source code of a web page in Mozilla Firefox, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View Page Source from the pop-up menu that appears.

View page source in Firefox.

View page source with elements

  1. Open Firefox and navigate the web page whose source code you’d like to view.
  2. Click the Menu Firefox Menu Icon icon in the top-right corner of the screen.
  3. Select Web Developer in the drop-down menu, then select Toggle Tools from the expanded menu.
  4. Click the Inspector tab in the top-left corner of the section that appears at the bottom of the screen.
Firefox Inspector tab.

Tip

In Firefox, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real time.

View a section of the page’s source code

  1. Highlight the portion of a web page for which you’d like to view the source code.
  2. Right-click that highlighted section and select View Selection Source.

Tip

You can use the Firebug add-on to view and edit the source code of a page, and view the changes live through the browser.

Microsoft Edge

Microsoft Edge

To view the source code of a web page in Microsoft Edge, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View page source from the pop-up menu that appears.

View page source selector in Edge.

View page source with elements

  1. Open Microsoft Edge and navigate the web page whose source code you’d like to view.
  2. Click the Settings and more Edge more icon icon in the upper-right corner of the screen.
  3. Move your mouse over More tools in the drop-down menu, and select Developer tools from the expanded menu.
  4. Click the Elements tab at the top of the window that appears on the right side of the screen.
Elements tab in Edge.

Tip

In Microsoft Edge, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real time.

Internet Explorer

Microsoft Internet Explorer

To view the source code of a web page in Microsoft Internet Explorer, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select View source from the pop-up menu that appears.

View source selector in Internet Explorer.

View page source with elements

  1. Open Internet Explorer and navigate the web page whose source code you’d like to view.
  2. Click Tools Internet explorer tools icon in the upper-right corner.
  3. Select F12 Developer Tools from the drop-down menu.
  4. Click the DOM Explorer tab at the top-left corner of the developer tools menu.
DOM Explorer tab in Internet Explorer.

Tip

In Internet Explorer, pressing F12 brings up the DOM tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page immediately.

Safari

Safari

In Safari, viewing a webpage’s source code requires you to enable the developer options. The following sections show you how to turn on this feature, and then how to view the source code of a web page.

Accessing developer options in Safari

  1. Open the Safari browser.
  2. Select Safari selector from the menu bar at the top-left corner of the screen.
  3. In the drop-down menu that appears, select Preferences.
Preferences selector
  1. Click the Advanced tab, and check the box next to Show Develop menu in menu bar.
Show Develop menu in Safari.
  1. You should now see the Develop selector in the Apple menu bar at the top of the screen.
Develop selector in Apple menu bar.

Viewing the source code

Note

You must have the developer options enabled for the following steps to work.

Method one

  1. Open Safari and navigate the web page whose source code you’d like to view.
  2. In the Apple menu bar at the top of the screen, click the Develop selector and choose Show Page Source from the drop-down menu.
  3. In the center of the screen, click the Elements tab at the top of the developer tools section.
Elements tab in Safari.

Method 2

Right-click a blank part of the web page and select Show Page Source from the pop-up menu that appears.

Show Page Source selector in Safari.

Tip

Once the developer options are enabled, you can also press Command+option+U to view the source code of a page.

Opera

Opera

To view the source code of a web page in Opera, use any of the following methods.

View source code only

Method one

To view only the source code, press Ctrl+U on your computer’s keyboard.

Method two

Right-click a blank part of the web page and select Page source from the pop-up menu that appears.

Page source selector in Opera.

View page source with elements

  1. Open Opera and navigate the web page whose source code you’d like to view.
  2. Click the Opera Opera Menu button icon in the upper-left corner of the browser window.
  3. Move your mouse over Developer in the drop-down menu, and select Developer tools from the expanded menu.
  4. Click the Elements tab at the top of the window that appears on the right side of the screen.
Elements tab in Opera.

Tip

If you don’t see the Developer submenu, choose More tools → Show developer menu. Then, click the menu button Opera menu button. again. You should now see the Developer entry listed.Tip

In Opera, pressing F12 or Ctrl+Shift+I also brings up the interactive developer tool. This tool provides interaction with the source code and CSS settings, allowing users to see how changes in the code affect the web page in real time.

Conclusion

Hopefully, this has helped you learn how to more effectively Open Source Code on Windows. If you have any questions, or would like to provide us with your own experiences on Open Source for Windows, please leave us a comment down below and let us know what you think!

0 Comments

No Comment.