Tuesday, February 21, 2023

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 using a mobile browser.

[Edit]Steps

[Edit]Chrome, Firefox, Edge, and Internet Explorer

  1. Open your web browser. The process for viewing source code on Chrome, Firefox, Microsoft Edge, and Internet Explorer is the same.
    View Source Code Step 1 Version 6.jpg
  2. Navigate to a webpage. It should be a page whose source code you wish to view.
    View Source Code Step 2 Version 6.jpg
  3. Right-click the page. If you're using a Mac computer with a one-button mouse, you can hold down 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.
    View Source Code Step 3 Version 6.jpg
    • Don't right-click a link or a photo when doing this or else the wrong menu will appear.
  4. Click or . Doing so will display your browser's source code in a new window or at the bottom of the current window.
    View Source Code Step 4 Version 6.jpg
    • You'll see View page source for Chrome and Firefox, and View Source for Microsoft Edge and Internet Explorer.
    • You can also press (PC) or (Mac) to display the source code.

[Edit]Safari

  1. Open Safari. This is a blue, compass-shaped app.
    View Source Code Step 5 Version 5.jpg
  2. Click . It's in the top-left side of your Mac's menu bar. Doing so invokes a drop-down menu.
    View Source Code Step 6 Version 5.jpg
  3. Click . This option is in the middle of the drop-down menu.
    View Source Code Step 7 Version 5.jpg
  4. Click the tab. It's in the top-right corner of the Preferences window.
    View Source Code Step 8 Version 5.jpg
  5. 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.
    View Source Code Step 9 Version 5.jpg
  6. Navigate to a webpage. It should be a page whose source code you wish to view.
    View Source Code Step 10 Version 5.jpg
  7. Click . This menu is to the left of the Window menu in your Mac's menu bar.
    View Source Code Step 11 Version 5.jpg
  8. Click . It's near the bottom of the drop-down menu. Clicking this option will prompt Safari to display the webpage's source code.
    View Source Code Step 12 Version 5.jpg
    • You can also press to display the source code.

[Edit]On Wikis

  1. Navigate to the page you want to view the wiki source code for.
    View Source Code Step 13 Version 4.jpg
  2. Click on the "View source" or "Edit" tab.
    View Source Code Step 14 Version 5.jpg
  3. Scroll through the source and select/copy the code you want to copy on your site.
    View Source Code Step 15 Version 5.jpg

[Edit]Tips

[Edit]Warnings

  • Be wary of downloading third-party applications that claim to display the source code of a website.

[Edit]Related wikiHows


[Edit]Quick Summary



No comments:

Post a Comment