There are several reasons why we may want to see the source code of a web page that we are visiting. Since I can get the URL of images or links until you can understand in depth which components are loaded, to name a couple of examples. Viewing the web code of a web page in Safari is very simple.

The menu Development, access to the source code

The first thing we will have to do is activate menu Development in safari. We will do it on the menu Safari > preferences, inside the tab Advanced we activate Show the Development menu in the menu bar. Subsequently, the steps are as follows:

  1. We open the web page from which we want to see its source code.
  2. On the menu Development, we choose Show page source code or press Option (⌥) + Command (⌘) + U.

We will see all the source code appears at the bottom of the screen. The code display is divided into two parts.

In the left sidebar, we can select the different elements of the web page, for example, the main HTML, the scripts, the style sheets or the images. When we select an element, on the right side of the drawer of the source code viewer, we will find its preview.

And it’s that easy. When we need to see the source code of a web page, either to download a video that appears on it or to investigate its operation, using Safari on our Mac we will do it easily.