In this blog post, I will give a detailed view of running HTML in visual studio code on your Windows 11 Operating System.
1. First you need to create a folder to save all your HTML files. You can create a folder at your desired location. I am going to create it on the desktop. Right-click on the desktop, click on New and click on Folder. I am going to name it HTML Demo and press enter.
2. Before you start working, you should have visual studio code. Open your folder. Now, right-click on the folder and click on show more options.
3. Click on open with code.
4. Here, you can create an HTML file. I am going to name the file test.html and press enter.
5. Once you do that, your HTML file will be created. You can also verify this in your folder explorer.
6. In the visual studio, you can write your HTML code. I am going to create and see an HTML table. Once you have written the code, save your file by pressing ctrl+s. Once you have done that, click on the extensions tab. Here, you need to search for the extension called open in the browser. Click on the first option.
7. This extension is from TechER. Click on Install.
8. Once the extension is installed, you will be able to see disable and uninstall option. Now close this extension and click on the explorer. Now, right-click on the HTML file and click on the open in another browser.
9. I am going to open it using Chrome.
10. It will open your file in google chrome. In this way, you can install any extensions. If you want to install any other HTML extension, you have to type HTML in the search option.
11. Here, you have an extension called HTML preview. Click on that. To view your HTML file, you need to press ctrl+shift+v. On your test.html file, you have to press this.
12. It will display the output.
13. If you want to see the preview and HTML file in a single window, you have to click the split button.
These are the steps to run HTML in visual studio code on Windows 11 Operating System.