Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Modern HTML PreviewNew to Visual Studio Code? Get it now.
Modern HTML Preview

Modern HTML Preview

Dylan Lu

|
5 installs
| (0) | Free
Preview workspace HTML files inside VS Code with browser-like behavior.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Modern HTML Preview

Open an .html or .htm file and press cmd+shift+v on macOS or ctrl+shift+v elsewhere.

Why Not HTML Preview?

You can't reliably preview pages that expect a real browser origin.

Traditional HTML preview injects HTML into a webview. Modern HTML Preview serves the file from an HTTP origin, so inline scripts, ES modules, relative fetch(), CSS, images, fonts, anchors, forms, unsaved edits, and asset reloads behave much more like a real browser.

Why Not Live Server?

You can't always forward a port.

Live Server needs a server port in remote workspaces. In some setups, like Remote Tunnels, you cannot do that. Modern HTML Preview works from the editor shortcut without managing a server or port.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft