Home  >  Article  >  Development Tools  >  How sublime runs html code

How sublime runs html code

下次还敢
下次还敢Original
2024-04-03 16:21:181152browse

There are two ways to run HTML code in Sublime Text: use the built-in HTML previewer: press the shortcut key to open the previewer, enter the HTML code, and click the "Preview" button. Use external browsers and plug-ins: Install the LiveReload plug-in and the preview in the browser will automatically refresh after saving the file.

How sublime runs html code

Running HTML code in Sublime Text

Sublime Text is a popular code editor that provides Multiple ways to run HTML code. Here are the two most common methods:

1. Use the built-in HTML previewer

  • Press Ctrl Alt H (Windows) or Cmd Option H (Mac) Open the HTML previewer.
  • Enter or paste your HTML code.
  • Click the Preview button to view the results.

2. Using an external browser

  • Install a browser plug-in such as LiveReload.
  • Open your HTML file in Sublime Text.
  • save document.
  • The plugin will automatically refresh the preview in the browser.

Detailed steps:

Use the built-in HTML previewer:

  1. Open Sublime Text.
  2. Open or create the HTML file you want to preview.
  3. Press Ctrl Alt H (Windows) or Cmd Option H (Mac) Open the HTML previewer.
  4. Wait for the preview to load.

Using an external browser (LiveReload plug-in):

  1. Install the LiveReload plug-in in the browser.
  2. Open Sublime Text.
  3. Open or create the HTML file you want to preview.
  4. Click ToolsBuild SystemSelect Build System.
  5. Select LiveReload to build the system.
  6. save document.
  7. The preview in the browser will refresh automatically.

The above is the detailed content of How sublime runs html code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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