Sublime Forum

How do i view my HTML

#1

How do I View what my HTML code would look like if it were to be in a browser? Thank you.

0 Likes

#2

You open a browser… :smile:

Just use something like browser-sync (so that it reloads your file as soon as you save). Here’s what you’d need to do:

$ browser-sync start --server --files "**/*.html, **/*.css, **/*.js"

Split your screen (ST on the left, browser on the right for example), and see the changes as you save!

Note 1: There is no need for any plugin for ST or extension for your browser
Note 2: you need to make sure you have an actual <body> tag in your html, because otherwise browser-sync won’t be able to insert the js it needs to add.

0 Likes

#3

Save your file with the extension .html, right click anywhere in the html code and chose Open in Browser.

0 Likes