The VSCode team has developed a Live Server extension with a lot of integrations. See v1.58 pre-release notes:

Live Preview

We have developed a Live Preview extension, which hosts a local server for web development previewing!

It features an in-editor browser preview, live preview refreshing (on file change or on save), multi-root support, and more!

The extension also has a Live Preview task, which runs a persistent server and allows you to view server traffic and its associated files.

To learn more about what it can do, view it in the marketplace or check out its repo.


Answer from Mark on Stack Overflow
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
Live Preview - Visual Studio Marketplace
February 9, 2026 - Extension for Visual Studio Code - Hosts a local server in your workspace for you to preview your webpages on.
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
HTML Preview - Visual Studio Marketplace
Extension for Visual Studio Code - Provides ability to preview HTML documents.
Discussions

VS Code preview extensions for HTML?
I've used this extension in the past, however, it's depreciated now. And honestly, there's no real need for it since you can just open your HTML file in a browser, and it will work just as well except you need to refresh it manually. If pressing F5 is too much for you, there are extensions for every browser that will auto-refresh every x seconds. Name: HTML Preview Id: tht13.html-preview-vscode Description: Provides ability to preview HTML documents. Version: 0.2.5 Publisher: Thomas Haakon Townsend VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=tht13.html-preview-vscode More on reddit.com
๐ŸŒ r/programminghelp
2
4
February 15, 2022
visual studio code - See HTML preview on side tab in VSCode - Stack Overflow
How can I see the HTML code live preview on the side tab in the VSCode editor? end result I want: CSS, js, PHP, etc should also work in the preview. More on stackoverflow.com
๐ŸŒ stackoverflow.com
Preview using visual studio code shows file contents instead of webpage preview as described in tutorial.
I'm following the tutorial to build a simple website in VSCode. I got to the bit 'to preview using visual studio code, right-click index.html, and select Open in Default Browser. The tutorial pictures show the simple website site displayed in theโ€ฆ More on learn.microsoft.com
๐ŸŒ learn.microsoft.com
2
0
How to view an HTML file in the browser with Visual Studio Code - Stack Overflow
With Notepad++ you have the option to Run in a browser. How can I do the same thing with Visual Studio Code? ... Microsoft released the even easier to setup "Live Preview" extension. More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ languages โ€บ html
HTML in Visual Studio Code
November 3, 2021 - No, VS Code doesn't have built-in support for HTML preview but there are extensions available in the VS Code Marketplace.
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
HTML Preview Pro - Ultimate Live Preview & Responsive Testing - Visual Studio Marketplace
July 1, 2025 - Extension for Visual Studio Code - ๐Ÿš€ The most reliable HTML preview extension for VS Code. Features live reload, responsive device testing, mobile preview, developer tools, and multi-browser support. Never fails like other extensions!
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ answers โ€บ questions โ€บ 1659108 โ€บ preview-using-visual-studio-code-shows-file-conten
Preview using visual studio code shows file contents instead of webpage preview as described in tutorial. - Microsoft Q&A
This can help determine if the issue is specific to a particular browser. 5.Check Visual Studio Code Settings: Explore Visual Studio Code's settings related to HTML files by navigating to File > Preferences > Settings.
Find elsewhere
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
Live HTML Previewer - Visual Studio Marketplace
Extension for Visual Studio Code - Edit and preview HTML documents in VS Code
๐ŸŒ
GitHub
github.com โ€บ tht13 โ€บ html-preview-vscode
GitHub - tht13/html-preview-vscode: A HTML previewer for Visual Studio Code ยท GitHub
An extension to preview HTML files while editing them in VSCode
Starred by 45 users
Forked by 27 users
Languages ย  TypeScript 98.9% | JavaScript 1.1%
๐ŸŒ
SMPTE
smpte.org โ€บ knowledge โ€บ html-editing-install-visual-studio-code-and-live-preview-server
5 Install Visual Studio Code and Live Preview Server
Preview the HTML as it would be presented in a browser. Perform document operations via the VS Code terminal, which is similar to using a command line editor. You may, however, use a command interface of your choice. ... Go to: Visual Studio Code https://code.visualstudio.com/ and follow the ...
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to Preview HTML in Visual Studio Code | Live Preview (2025) - YouTube
In this video, Iโ€™ll show you how to preview HTML in Visual Studio Code using the Live Preview extension by Microsoft. This is a fast and easy way to view you...
Published ย  June 6, 2025
๐ŸŒ
Wikihow
wikihow.com โ€บ computers and electronics โ€บ internet โ€บ website and blog creation โ€บ markup languages โ€บ html โ€บ 4 ways to run a html file in visual studio code - wikihow
4 Ways to Run a HTML File in Visual Studio Code - wikiHow
August 21, 2025 - This launches the HTML file in a separate window allowing you to preview your HTML file. To close the preview, simply click the "x" icon at the top of the window. ... Open Visual Studio Code.
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
Live Preview Desktop and Mobile - Visual Studio Marketplace
April 29, 2023 - Extension for Visual Studio Code - Preview HTML files in a separate panel with live updates.
๐ŸŒ
DhiWise
dhiwise.com โ€บ post โ€บ smart-ways-to-view-html-files-in-visual-studio-code
Best Ways to View HTML Files in Visual Studio Code
December 16, 2024 - Use the Explorer pane to create a folder for your project. Add your HTML file inside the workspace. ... Open the Extensions View (Ctrl+Shift+X). Search for Live Server, HTML Preview, or Live Preview.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-au โ€บ answers โ€บ questions โ€บ 2184064 โ€บ vs-code-is-not-showing-my-html-code-rather-it-is-j
VS Code is not showing my html code rather it is just rendering it in preview mode - Microsoft Q&A
Add-on components that enhance and customize the Visual Studio integrated development environment ... Welcome to Microsoft Q&A forum. ... VS Code doesn't have built-in support for HTML preview but there are extensions available in the VS Code ...