📄 Preview and View HTML files inside VS Code with ease!
✅ Live HTML Preview in a WebView panel
✅ Supports Linked CSS & JS Files
✅ Handles Internal Links (#about) Correctly
✅ Opens External Links in Browser
✅ Supports CTRL + ALT + V Shortcut for Quick Preview
- Open VS Code
- Go to Extensions (
Ctrl + Shift + X) - Search for
"HTML View" - Click Install
- Download the
.vsixfile from Releases - Open VS Code and go to
Extensions→ Click...→Install from VSIX - Select the downloaded
.vsixfile
- Open an HTML file in VS Code
- Press
Ctrl + Shift + P - Type
"Preview HTML"and press Enter
- Press
Ctrl + Alt + Vto instantly preview the current HTML file
- The extension creates a WebView panel to render HTML files
- It ensures that internal fragment links (
#about) stay inside the WebView - External links (
https://example.com) open in your default browser - It resolves relative paths for CSS/JS files automatically
| Command | Description | Shortcut |
|---|---|---|
htmlView.preview |
Open HTML Preview | Ctrl + Alt + V |
git clone https://github.com/NSTechBytes/html-view.git
cd html-view
npm install- Open the project in VS Code
- Press
F5to start a new VS Code instance with the extension loaded
Found a bug? Have an idea?
👉 Create an Issue
If you like this extension, consider ⭐ starring the repo!
Nasir Shahbaz
🔗 GitHub | Website
Apache 2.0 License. See LICENSE for details.