As you work on a file, you can preview how it would look in Safari.
To preview the file you are working on:
Local files can be previewed in "real time" without being saved first. Previews of remote files will only update when the file is saved.
You can also view a preview side-by-side with your editor by splitting the tab.
More information on the preview mode can be found here.