In this article, you will learn how to view source code, that is, the programming language of a web page, in most popular browsers. Keep in mind that in mobile versions of browsers (except for the mobile version of Safari), the source code of the page cannot be viewed.
Steps
Method 1 of 2: Chrome, Firefox, Edge, and Internet Explorer

Step 1. Open your web browser
The process for viewing source code is the same for Chrome, Firefox, Microsoft Edge, and Internet Explorer.

Step 2. Open a web page
That is, go to the page for which you want to view the source code.

Step 3. Right-click on the page
If you have a Mac and only one mouse button, hold down Control and left-click. If you have a laptop with a trackpad, click it with two fingers. A context menu will open.
Do not right-click on a link or photo, as this will open another menu

Step 4. Click View Page Code or The source code of the page.
The source code of the page appears in a new window or at the bottom of the current window.
- In Chrome, click on View Page Source, in Firefox on Page Source, in Edge and Internet Explorer on View Code.
- Alternatively, press Ctrl + U (Windows) or ⌥ Option + ⌘ Command + U (Mac OS X) to display the source code.
Method 2 of 2: Safari

Step 1. Open Safari
This browser has a blue compass icon.

Step 2. Click on Safari
It's in the upper-left side of the menu bar. A dropdown menu will open.

Step 3. Click Settings
It's in the middle of the dropdown menu.

Step 4. Click on the Add-ons tab
It's in the upper-right corner of the Preferences window.

Step 5. Check the box next to "Show Develop menu in menu bar"
It's near the bottom of the Preferences window. The Develop menu appears on the menu bar.

Step 6. Open the web page
That is, go to the page for which you want to view the source code.

Step 7. Click Development
This menu is to the left of the Window menu on the menu bar.

Step 8. Click Show page code
It's near the bottom of the drop-down menu. The Safari window displays the source code of the web page.