Article directory
VS Code runs HTML files
提示:这里可以添加本文要记录的大概内容:
But the difference between me using VS Code and Hbuilder is:
I remember that in Hbuilder, you can go to "File" → "New" → "HTML5+ Project" in the menu bar, fill in the project name, path and other information and click "Finish" to create a new project.
1. Install the VS Code configuration plug-in
How to use VS Code to install plug-ins and common plug-ins on VS Code. Click here to view
I used to use Hbuilder to write HTML, but recently I suddenly discovered that VS Code is also good. You just need to install the open in browser plug-in.
2. Create a new folder on your computer
VS Code is used to open a folder locally
First create a new folder on your computer,
open VS Code
and select [File] → [Open Folder] to find the newly created folder.
Then click on the folder, right-click again and select [New Folder]
Purpose: to classify files
3. Create a new file [name.html]
Then right-click to create a new file [name.html] and
the html file icon will become: <>
The css file icon will become:#
4. Run the .html file
Enter the page and enter: html:5
Enter. Most of our code is written under body
the tag
. Here is a simple HTML page display:
There is also a function to automatically save the code in the file.