If you want to ‘View Source’ for on a webpages, you’ll need to enable Safari’s ‘Developer’ menu.

 

Here is how you do it: 

safari-8-preferences-advanced1. Open Safari

2. Select “Preferences” from the “Safari menu”.

3. In the “Advanced” section and select “Show Develop menu in menu bar”

4 close the Preferences window

5. you shude now have Develop menu visible in the menu bare.

4. Visit the web page you want to view HTML source for.

5. Select “Show Page Source” from the “Develop” menu that has been added to Safari.

Tips:
You can view the source by right-clicking on the page (not on an image) and choosing “Show Page Source.”