First open our VS Code software, and then create a new HTML file. Note that when creating a new file in the VS Code software, its suffix must also be written with
After we wrote the HTML content, we right-clicked the mouse and found that there was no button to run the HTML file
We need to click on the VS Code software "Extensions" on the left, or hold down the Ctrl shift I key on the keyboard at the same time to enter the "Extensions" interface
After entering the "Extensions" interface, we enter in the search box "open", then find "open in browser", click "install" in the lower right corner to install
After installation, we can run our HTML file . After the installation is complete, we return to our HTML interface, then right-click the mouse and find the option identified in the picture below to run
We can also directly hold down Alt on the keyboard B key to run, then we can see on the web page that our HTML file has been run
Recommended related articles and tutorials: vscode tutorial
The above is the detailed content of How to compile and run html files with vscode. For more information, please follow other related articles on the PHP Chinese website!