- Installing extensions to get the HTML code to run in the browser :
- Click on Extensions marketplace icon on the activity bar of the VS Code on the left.
Once you click on the Extensions icon , extensions view will appear in the VS Code. We need mainly two extensions to get started to execute HTML code.
- open in browser Extension
- Live Server Extension
As you can see above , it is an Extension view, now in the search box search for “open in browser” extension , and install it, by clicking on install button.Similarly, go ahead and install “Live Server” Extension.
Open in Browser Extension : It allows you to open the current file in your default browser or application.
Live Server Extension : It launches a development local server with live reload feature for static and dynamic pages. You will not have to reload/refresh your browser page after making any changes to your html file, changes will be reflected automatically due to the Live Server extension.