The tutorial column of sublime below will introduce to you how to use sublime Text 3 to write HTML. I hope it will be helpful to friends in need!
1. Download and install Sublime Text 3.
2. Open the Sublime Text 3 interface.
3. Press Ctrl N to create a new page.
4. Press Ctrl S and save as the file name you specify, using the .html suffix (the suffix is important, Sublime will It will determine the language type based on the suffix and help you enable the corresponding auto-completion). For example, the file name is test.html
5. Enter < h, as shown in the figure, after the corresponding code completion candidate directory pops up, you can see that html is in the first one, press Enter, and it will be automatically completed:
6. As shown in the figure , Sublime Text 3 automatically generates the framework of the html page for us, and we no longer have to laboriously enter a large amount of initial content:
and press Enter. Sublime Text 3 will do it for you. Add code completion for secondary titles. For example, after entering a title as Chapter 1, press Ctrl S to save the file.
9. No need to close Sublime, just use any popular browser to open your test.html file;
The current tag name of the browser is the title:index you entered, and the content of the address bar is the local path of your html file.
Chapter 1 is the secondary title you just entered.
10. Do not close the browser, enter
and
Web! and press Ctrl S to save the file.
11. Refresh the browser and you can see that the html display content has changed: (The refresh operation in the Chrome browser is to right-click the menu to reload, or press Ctrl R)
12. At this point, the introductory part of writing HTML using Sublime is completed, and it is also possible to use the browser to immediately and manually track changes in display effects while writing code. We can also use split screen in win10 to juxtapose Sublime with the browser for easier observation.
The above is the detailed content of Teach you to quickly use sublime Text3 to write HTML. For more information, please follow other related articles on the PHP Chinese website!