When you right-click on any web page in Safari on Mac, it doesn’t reveal the Show Page Source and Inspect Element buttons. To see these, you need to enable the Develop menu—we’ll show you how to do that.

Once you’ve enabled the Develop menu, right-clicking a blank space on any website will reveal the Inspect Element and Show Page Source buttons. These allow you to take a look at the source code of any website, which is useful for things like downloading images from websites and debugging code or finding out what it looks like behind any site (for website designers).

How to Enable the Develop Menu in Safari on Mac

You can easily turn on the Develop menu in Safari by following a couple of steps. Open Safari on your Mac and click the “Safari” button in the menu bar.

Click Safari in the menu bar

Next, select “Preferences.” Alternatively, you can use the keyboard shortcut Command+, (comma). This will also open up Safari preferences.

Click Preferences

Go to the “Advanced” tab.

Click Advanced

Check the box for “Show Develop Menu in Menu Bar.”

Enable Show Develop menu in menu bar

Advertisement

Now the Develop menu will appear between Bookmarks and Window at the top.

The Develop menu in the menu bar

Apart from being able to view the page source, this will allow you to access developer-focused features, such as disabling JavaScript on any website.

How to View Page Source in Safari on Mac

Once you’ve enabled the Develop menu, there are a couple of ways to view the page source in Safari.

Open any website in Safari and right-click the blank space on the page. Now, select “Show Page Source.” You can also get to this menu by using the keyboard shortcut Option+Command+u.

Click Show Page Source

If you’re looking for images or other media elements from any web page, Safari makes it easy to find these. In the left-hand pane, you will see various folders such as Images, Fonts, etc. Click the “Images” folder to quickly find the photos that you need.

Click the Images folder to view all images from any webpage

After selecting an image, you can view its details easily by opening up the details sidebar. The button to open this is located at the top-right of the console, just below the gear icon. You can also open this with the shortcut Option+Command+0.

Open the details sidebar

Advertisement

Click “Resource” at the top of the details sidebar to view details, such as the size of the image and its full URL.

Click the Resources tab

You can change the position of the page source console easily, too. There are two buttons at the top-left of this console, right next to the X button. Click the rectangle icon to move the console to a different side within the browser window.

If you’d like to open the page source console in a separate window, you can click the two-rectangles icon. This will detach the console and open it in a separate window.

To check out the code for any specific element on the page, you can right-click that element and select “Inspect Element.” This will take you directly to the code for the element that you selected.

Click Inspect Element


Whenever you’re done looking at the code, click the X button to close the page source console and return to browsing on Safari. You can also check out how to view a website’s page source in Google Chrome here.

RELATED: How to View the HTML Source in Google Chrome

Pranay Parab Pranay Parab
Pranay Parab has been a technology journalist for over 10 years, during which time he's written well over 500 tutorials, and covered everything from social media apps to enterprise software. Pranay lives in Mumbai, India, and keeps traveling around the country and the world.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.