PDF download Download Article
Read a website's source code on Chrome, Internet Explorer, Safari, & More
PDF download Download Article

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.

Method 1
Method 1 of 3:

Chrome, Firefox, Edge, and Internet Explorer

PDF download Download Article
  1. The process for viewing source code on Chrome, Firefox, Microsoft Edge, and Internet Explorer is the same.
  2. It should be a page whose source code you wish to view.
    Advertisement
  3. 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 create a drop-down menu.
    • Don't right-click a link or a photo when doing this or else the wrong menu will appear.
  4. Doing so will display your browser's source code in a new window or at the bottom of the current window.
    • You'll see View page source for Chrome and Firefox, and View Source for Microsoft Edge and Internet Explorer.
    • You can also press Ctrl+U (PC) or Option+ Command+U (Mac) to display the source code.[1]
  5. Advertisement
Method 2
Method 2 of 3:

Safari

PDF download Download Article
  1. This is a blue, compass-shaped app.
  2. It's in the top-left side of your Mac's menu bar. Doing so invokes a drop-down menu.[2]
  3. This option is in the middle of the drop-down menu.[3]
  4. It's in the top-right corner of the Preferences window.[4]
  5. This option is near the bottom of the Preferences window. You should see a Develop menu appear in your Mac's menu bar.[5]
  6. It should be a page whose source code you wish to view.
  7. This menu is to the left of the Window menu in your Mac's menu bar.[6]
  8. It's near the bottom of the drop-down menu. Clicking this option will prompt Safari to display the webpage's source code.[7]
    • You can also press Option+ Command+U to display the source code.
  9. Advertisement
Method 3
Method 3 of 3:

On Wikis

PDF download Download Article
  1. Advertisement

Community Q&A

Search
Add New Question
  • Question
    The view source doesn't exist on my Mac, where do I find it?
    Community Answer
    Community Answer
    To be able to view the source code of a webpage under Safari, you first need to enable the Developer menu: Click on Safari menu > Preferences > Advanced. Check "Show Develop menu in menu bar" Close the Preferences window Go to the Develop menu > Show Page Source
  • Question
    How do I view the source code of an image on a page without seeing the code for the whole page?
    Community Answer
    Community Answer
    Right-click on the image and select "Inspect" from the available options.
  • Question
    How do I create HTML source code for an image that I have on my computer?
    Community Answer
    Community Answer
    Add the image location on your computer to the source code. Make sure the file is available and then run.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

  • While you can't usually view source code on a mobile browser, you can save a Safari bookmark on iPhone or iPad to view mobile Safari source code.
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

Warnings

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

You Might Also Like

Learn a Programming LanguageLearn a Programming Language
Format Text as Code in Discord2 Simple Ways to Format Text Into Code on Discord
Change Code on Schlage Lock Change 4-Digit User Codes on Schlage Locks
Run a Program from the Command Line on LinuxRun a Program from the Command Line on Linux
Delay a Batch File Delay a Batch File: Timeout, Pause, Ping, Choice & Sleep
Reset Schlage Keypad Lock Without Programming Code Factory Reset a Schlage Lock & Restore the Default Programming Code
Convert from Binary to DecimalConverting Binary to Decimal: Positional Notation & Doubling
Download a GitHub Folder3 Ways to Download GitHub Directories and Repositories
Make an Exe FileMake an Exe File
Write PseudocodeLearn to Write Pseudocode: What It Is and Why You Need It
Convert from Decimal to HexadecimalConvert from Decimal to Hexadecimal: A Quick Guide + Examples
Make a Program Using NotepadMake a Program Using Notepad
Create a Mobile App Develop a Mobile App: Planning, Designing, & Publishing
CodeCode
Advertisement

About This Article

Jack Lloyd
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 1,019,435 times.
How helpful is this?
Co-authors: 33
Updated: December 13, 2024
Views: 1,019,435
Article SummaryX

1. Open the website in a browser.
2. Right-click the page.
3. Click View page source or View source.

Did this summary help you?

Thanks to all authors for creating a page that has been read 1,019,435 times.

Is this article up to date?

Advertisement