To be able to view the source code of a
webpage under Safari, you first need to enable
the Developer menu:
- Click on Safari menu > Preferences >
Advanced.
- Check "Show Develop menu in menu bar".
- Close the Preferences window.
- Go to the Develop menu > Show Page
Source.