Home > Article > Web Front-end > How to run html files in VS Code
How to run html files with VS Code: First open the VS Code software and create a new HTML file; then click "Extension" on the left side of the VS Code software and find "open in browser"; finally install and run document.
The operating environment of this tutorial: Windows 7 system, Visual Studio Code version 1.52.1, DELL G3 computer. This method is suitable for all brands of computers.
How to run html files with VS Code:
Step 1: First open our VS Code software, and then create a new HTML file. Note that in the VS Code software Create a new file inside, and its suffix must also be written with
# Step 2: After we have written the HTML content, we right-click and find that the HTML file is not running. button, so how do we run the HTML file?
Step 3: We need to click "Extension" on the left side of the VS Code software, or hold down the Ctrl shift I key on the keyboard at the same time to enter the "Extension" interface
Step 4: After entering the "Extension" interface, we enter "open" in the search box, then find "open in browser" and click "install" in the lower right corner to install
Step 5: After installation, we can run our HTML file. After the installation is completed, we return to our HTML interface, then right-click the mouse and find the option marked below to run
Step 6: We can also directly press and hold Press the Alt B key on the keyboard to run. At this time we can see on the web page that our HTML file has been run.
Related learning recommendations: html video tutorial
The above is the detailed content of How to run html files in VS Code. For more information, please follow other related articles on the PHP Chinese website!