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.
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:
- Open Sublime Text.
- Open or create the HTML file you want to preview.
- Press Ctrl Alt H (Windows) or Cmd Option H (Mac) Open the HTML previewer.
- Wait for the preview to load.
Using an external browser (LiveReload plug-in):
- Install the LiveReload plug-in in the browser.
- Open Sublime Text.
- Open or create the HTML file you want to preview.
- Click Tools → Build System → Select Build System.
- Select LiveReload to build the system.
- save document.
- 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