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?