Home > Development Tools > VSCode > How to run an HTML project created by vscode

How to run an HTML project created by vscode

下次还敢
Release: 2024-04-03 03:33:21
Original
1237 people have browsed it

How to use VS Code to run an HTML project

Step 1: Create an HTML project

  • Open VS Code.
  • Click "File" > "New" > "Folder".
  • Enter a project name (for example, "my_html_project").

Step 2: Create the HTML file

  • Right-click the project folder and select New >File.
  • Enter a file name (for example, "index.html").

Step 3: Write the HTML code

  • In the index.html file, write the following basic HTML code:
<code class="html"><!DOCTYPE html>
<html>
<head>
  <title>我的第一个 HTML 页面</title>
</head>
<body>
  <h1>欢迎来到我的第一个 HTML 页面!</h1>
</body>
</html></code>
Copy after login

Step 4: Run the HTML project

  • In VS Code, press Ctrl Shift B (Windows) or Cmd Shift B (Mac).
  • VS Code will automatically open the built-in browser and display the HTML page.

The above is the detailed content of How to run an HTML project created by vscode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template