If you want to see how a webpage was built, try viewing its source code.

What to Know

This article shows how to view HTML source code in Safari.

View Source Code in Safari

Showing source code in Safari is easy:

Open Safari.

The “Show Page Source” command under Safari’s Develop menu

Navigate to the web page you would like to examine.

Select theDevelopmenu in the top menu bar.

Select theShow Page Sourceoptionto open a text window with the HTML source of the page.

Alternatively, pressOption+Command+Uon your keyboard.

If the Develop menu is not visible, go intoPreferencesin theAdvancedsection and selectShow Develop menu in menu bar.

You must enable theDevelop menuinPreferencesfor the option to appear.

Remember that source files can be very complicated.

Viewing the HTML source is just the first step.

FAQ

You cannot edit webpage source code in Safari.

Then in the address text box, copy and pastea specific javascript code, thenSave.