
Viewing the HTML source of a webpage
You can view the HTML source code of a webpage in Safari. You can also save a webpage so that you can view it later or use it as a source for HTML code.
To view the HTML source of a webpage, open the page you want to view and choose View Source from the View menu.
To save the HTML source of a webpage, open the page you want to save and choose Save As from the File menu. Type a name for the file and select where you want to save it, then click Save.
Saving the page saves only the HTML text content of the current page. It does not save elements of the page, such as pictures, that are referenced in the HTML code of the page.