How to View Source Code

This wikiHow teaches you how to view the source code of a website, which is the code behind any website (such as HTML, CSS, and JavaScript), on most common browsers. Excluding a Safari trick, you cannot view a website's source code while...

Method 1 of 3:

Chrome, Firefox, Edge, and Internet Explorer

  1. Picture 1 of How to View Source Code
    Open your web browser. The process for viewing source code on Chrome, Firefox, Microsoft Edge, and Internet Explorer is the same.
  2. Picture 2 of How to View Source Code
    Navigate to a webpage. It should be a page whose source code you wish to view.
  3. Picture 3 of How to View Source Code
    Right-click the page. If you're using a Mac computer with a one-button mouse, you can hold down Control and click instead. If you are on a laptop with a trackpad, you can use two fingers to click the page instead. This will invoke a drop-down menu.
    1. Don't right-click a link or a photo when doing this or else the wrong menu will appear.
  4. Picture 4 of How to View Source Code
    Click View page source or View Source. Doing so will display your browser's source code in a new window or at the bottom of the current window.
    1. You'll see View page source for Chrome and Firefox, and View Source for Microsoft Edge and Internet Explorer.
    2. You can also press Ctrl+U (PC) or Option+ Command+U (Mac) to display the source code.
Method 2 of 3:

Safari

  1. Picture 5 of How to View Source Code
    Open Safari. This is a blue, compass-shaped app.
  2. Picture 6 of How to View Source Code
    Click Safari. It's in the top-left side of your Mac's menu bar. Doing so invokes a drop-down menu.
  3. Picture 7 of How to View Source Code
    Click Preferences. This option is in the middle of the drop-down menu.
  4. Picture 8 of How to View Source Code
    Click the Advanced tab. It's in the top-right corner of the Preferences window.
  5. Picture 9 of How to View Source Code
    Check the "Show Develop menu in menu bar" box. This option is near the bottom of the Preferences window. You should see a Develop menu appear in your Mac's menu bar.
  6. Picture 10 of How to View Source Code
    Navigate to a webpage. It should be a page whose source code you wish to view.
  7. Picture 11 of How to View Source Code
    Click Develop. This menu is to the left of the Window menu in your Mac's menu bar.
  8. Picture 12 of How to View Source Code
    Click Show Page Source. It's near the bottom of the drop-down menu. Clicking this option will prompt Safari to display the webpage's source code.
    1. You can also press Option+ Command+U to display the source code.
Method 3 of 3:

On Wikis

  1. Navigate to the page you want to view the wiki source code for.
  2. Click on the "View source" or "Edit" tab.
  3. Scroll through the source and select/copy the code you want to copy on your site.
Update 05 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile