How to view the source code: 12 steps

Table of contents:

How to view the source code: 12 steps
How to view the source code: 12 steps
Anonim

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

View Source Code Step 1
View Source Code Step 1

Step 1. Open your web browser

The process for viewing source code is the same for Chrome, Firefox, Microsoft Edge, and Internet Explorer.

View Source Code Step 2
View Source Code Step 2

Step 2. Open a web page

That is, go to the page for which you want to view the source code.

View Source Code Step 3
View Source Code Step 3

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

View Source Code Step 4
View Source Code Step 4

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

View Source Code Step 5
View Source Code Step 5

Step 1. Open Safari

This browser has a blue compass icon.

View Source Code Step 6
View Source Code Step 6

Step 2. Click on Safari

It's in the upper-left side of the menu bar. A dropdown menu will open.

View Source Code Step 7
View Source Code Step 7

Step 3. Click Settings

It's in the middle of the dropdown menu.

View Source Code Step 8
View Source Code Step 8

Step 4. Click on the Add-ons tab

It's in the upper-right corner of the Preferences window.

View Source Code Step 9
View Source Code Step 9

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.

View Source Code Step 10
View Source Code Step 10

Step 6. Open the web page

That is, go to the page for which you want to view the source code.

View Source Code Step 11
View Source Code Step 11

Step 7. Click Development

This menu is to the left of the Window menu on the menu bar.

View Source Code Step 12
View Source Code Step 12

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.

Alternatively, you can press ⌥ Option + ⌘ Command + U to display the source code

Advice

In mobile versions of browsers, the source code of the page cannot be viewed. This does not apply to Safari, which can be bookmarked on an iPhone or iPad and then view the source code

Popular by topic