How to view the source code

Author: Virginia Floyd
Date Of Creation: 9 August 2021
Update Date: 22 June 2024
Anonim
How to view html source code in chrome
Video: How to view html source code in chrome

Content

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

  1. 1 Open your web browser. The process for viewing source code is the same for Chrome, Firefox, Microsoft Edge, and Internet Explorer.
  2. 2 Open a web page. That is, go to the page for which you want to view the source code.
  3. 3 Right click on the page. If you have a Mac computer 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.
  4. 4 Click on View page code or Source code of the page. The source code for 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.
    • You can also click Ctrl+U (Windows) or ⌥ Option+⌘ Command+U (Mac OS X) to display the source code.

Method 2 of 2: Safari

  1. 1 Open Safari. This browser has a blue compass icon.
  2. 2 Click on Safari. It's in the upper-left side of the menu bar. A dropdown menu will open.
  3. 3 Click on Settings. It's in the middle of the dropdown menu.
  4. 4 Click on the tab Supplements. It's in the upper-right corner of the Preferences window.
  5. 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.
  6. 6 Open a web page. That is, go to the page for which you want to view the source code.
  7. 7 Click on Development of. This menu is to the left of the Window menu on the menu bar.
  8. 8 Click on Show the program code of the page . It's near the bottom of the drop-down menu. The Safari window displays the source code of the web page.
    • You can also click ⌥ Option+⌘ Command+Uto display the source code.

Tips

  • 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.

Warnings

  • It is best not to download third-party applications that supposedly display the source code of the web page.