How do I view the page source in Safari just like I can in Windows Internet Explorer? I'm experienced with Windows, not so much with Mac. In Windows Internet Explorer I can go to the View menu and select Source as in to “view source”. This opens a window showing me the html code of the page I am visiting, just like in the screenshot below:



On my Mac I looked in Safari's View menu and all the other menus and do not see anything resembling this option.

How can I do the same thing on Safari in macOS?
The option is available in Safari, but it’s not on by default. To activate this, follow the steps below:


Launch Safari
Go to Safari > Preferences (or just use the command, shortcut)
Click on the Advance tab in the Toolbar (it should be the last one)
At the very bottom tick the checkbox for Show Develop menu in menu bar 
Exit the Preferences window


Now you’ll see a new Develop menu in the menu bar. This will give you access to a whole heap of options, including Show Page Source. It may be worth you exploring the various options to see what else you can make use of.

[EDIT]

I forgot to mention, once you've enabled the Develop menu, you will be able to also right-click on any page and choose Show Page Source from the menu that appears.