Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use VS Code’s Integrated Browser to render a local HTML file, and use Microsoft’s Live Preview extension when you need automatic reloads. Open index.html, choose the preview command, then use Add Screenshot to Chat for the visible viewport or Add Area Screenshot to Chat for a selected rectangle. Full-page capture is available only through an experimental command.

This workflow is suitable for checking layout, sharing a design iteration, and documenting a page without leaving VS Code. The sections below cover setup, CSS troubleshooting, Markdown, browser-based VS Code, and an API alternative when you need repeatable captures.

Choose the right VS Code preview

Goal Best route What it provides
Inspect a local HTML file quickly Integrated Browser Browser rendering inside VS Code; edits appear after the file is saved.
Reload automatically while editing HTML and CSS Microsoft Live Preview extension A local development server with live reload for static and dynamic pages.
Capture what is visible Integrated Browser screenshot tools Current viewport or a selected rectangular area.
Capture an entire long page Integrated Browser experimental full-page command Content beyond the viewport; the command is experimental.
Preview Markdown with custom styles Built-in Markdown preview Side-by-side synchronized preview and the markdown.styles setting.

Render an HTML file in VS Code’s Integrated Browser

1. Open the project and check file paths

  1. Open the folder containing your project with File > Open Folder.
  2. Confirm that the document and stylesheet are saved, for example index.html and styles.css.
  3. Use a relative stylesheet reference such as <link rel="stylesheet" href="styles.css"> when both files are in the same folder.

2. Start the preview

Open index.html. Use the editor’s preview control or the command that opens the file in the Integrated Browser. VS Code can preview HTML files inside the Integrated Browser, so a separate physical device is not required.

3. Edit and refresh

Save the HTML or CSS file, then check the preview. A normal local file preview reflects saved changes. If a change does not appear, reload the Integrated Browser and verify that the preview is showing the file you edited rather than a similarly named copy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Amazon Basics Wired QWERTY Keyboard, Works with Windows, Plug and Play, Easy to Use with Media Control, Full-Sized, Black
  • KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
  • EASY SETUP: Experience simple installation with the USB wired connection
  • VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
  • SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
  • FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.

Get live reload with Microsoft Live Preview

Install and start the extension

  1. Open the Extensions view with View > Extensions.
  2. Search for Microsoft’s Live Preview extension and install it.
  3. Open index.html in the editor.
  4. Right-click in the file and choose Show Preview.

Live Preview launches a local development server with live reload for static and dynamic pages. Keep the preview open beside your editor, save a file, and the page refreshes automatically.

When live reload does not work

  • The page never starts: make sure a folder, not just an unsaved tab, is open in VS Code.
  • CSS changes are missing: save the stylesheet and check the href path and filename casing.
  • The wrong page appears: close duplicate preview tabs and start Show Preview from the intended HTML file.
  • Assets fail to load: use paths relative to the HTML document and avoid assuming that a filesystem path beginning with / points to your project root.
  • Stale styles remain: reload the preview and inspect whether the browser is displaying an older generated file or a different stylesheet.

Take a screenshot of the current preview

Capture the viewport

  1. Open the page in the Integrated Browser.
  2. Arrange the browser viewport at the size you want to document.
  3. Run Add Screenshot to Chat.

This command captures the current browser viewport. It is useful for a component, a hero section, or any state that fits on screen.

Capture a selected area

  1. Open the same page in the Integrated Browser.
  2. Run Add Area Screenshot to Chat.
  3. Drag across the rectangle you want to capture and confirm the selection.

Area capture is preferable when browser chrome or unrelated parts of the page would distract from the element you are reviewing.

Capture a full page (experimental)

Full-page capture includes content below the current viewport, but the documented command is experimental. If it is not available, enable workbench.browser.experimentalUserTools.enabled in Settings, reopen the browser tools if necessary, and look for the experimental full-page screenshot action.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Because this feature is experimental, do not build a release process that depends on a particular export dialog or image format. The documented workflow establishes capture and attachment commands, not a guaranteed standalone image-file save screen.

Rank #2
Sale
Logitech MK270 Full Size Wireless Keyboard and Mouse Combo - Black
  • Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
  • Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
  • Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
  • Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
  • Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites

Make CSS render predictably

Use a minimal test page

When a complex project looks wrong, reduce the problem to a page like this:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="styles.css">
  <title>Preview test</title>
</head>
<body>
  <main class="card">CSS is connected.</main>
</body>
</html>
body { margin: 0; font: 16px system-ui, sans-serif; }
.card { margin: 2rem; padding: 2rem; background: #eef2ff; color: #1e1b4b; }

If the card is unstyled, inspect the stylesheet link before changing selectors. A missing file, wrong directory, unsaved edit, or filename-case mismatch is more likely than a browser rendering defect.

Separate layout problems from preview problems

  • Use browser developer tools, where available, to inspect the computed style and box model.
  • Temporarily add an obvious rule such as outline: 3px solid red to confirm that the expected stylesheet is loaded.
  • Check whether another rule has greater specificity or appears later in the cascade.
  • Confirm that the element is not hidden by display: none, an overflowing parent, or a positioned layer.

Preview Markdown and apply custom CSS

For documentation files, use VS Code’s built-in Markdown preview and open it beside the editor. The preview synchronizes as you edit. To apply custom styling, set markdown.styles to a workspace-relative stylesheet or an HTTPS stylesheet. A workspace-relative value keeps the styling with the project; an HTTPS value is useful when the stylesheet is centrally hosted.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Markdown preview has security restrictions. Under the strict setting, scripts are disabled and insecure resources may be blocked. Treat those restrictions as part of the preview environment rather than assuming that a script-dependent page will behave like a normal browser tab.

VS Code for the Web versus desktop VS Code

VS Code for the Web can edit HTML and CSS and can show Markdown previews in a browser. It runs in a browser sandbox, however, and its official limitations include no terminal and no debugger. Use desktop VS Code when the project requires a local server, command-line build, debugging session, or broader extension support.

Rank #3
Sale
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
  • All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
  • Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
  • Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
  • Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
  • Plastic parts in K120 include 51% certified post-consumer recycled plastic*

Optional third-party preview extensions

The Marketplace listing for Live HTML Previewer describes side-by-side and full-page HTML preview, but it explicitly says JavaScript is not supported in that extension’s preview. That makes it an optional choice for static markup, not a replacement for Microsoft Live Preview when your page needs scripts or a local development server.

Repeatable captures with ScreenshotNeo

If you need screenshots from a build job, a list of URLs, or a page that is not open in your editor, ScreenshotNeo provides a website screenshot API and MCP server. It accepts one GET request and returns PNG, JPEG, WebP, or PDF. Its clean-shot workflow accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.

Or skip the browser setup

Use the API documentation at screenshotneo.com/docs/ for parameter details. Replace the example URL with your own page.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo can also capture a full page with lazy images loaded, one CSS-selected element, dark mode, any viewport or one of 12 device presets, retina scale, PDFs with paper size, margins, landscape and page ranges, HTML/CSS to image, custom CSS or JavaScript, clicks before capture, hidden selectors, waits for a selector, delay or network idle, blocked ads, trackers, requests or resource types, custom headers, cookies, user agents and Authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed public-image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, easing migration.

Its MCP server exposes take_screenshot, get_page_info and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Yearly billing gives two months free, and every feature is available on every plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Redragon K521 Upgrade Rainbow LED Gaming Keyboard, 104 Keys Wired Mechanical Feeling Keyboard with Multimedia Keys, One-Touch Backlit, Anti-Ghosting, Compatible with PC, Mac, PS4/5, Xbox
  • 【Dreamy Rainbow Gaming Keyboard】K521 Gaming Keyboard Adopts a Different LED Backlight Design, Upgraded on the Traditional LED Backlight Effect, Making the Light More Penetrating, Giving You a More Dazzling Visual Effect, Making Your Gaming Process More Enjoyable
  • 【One Touch Opens & Visual Feast】The K521 Red Dragon Keyboard has a One-Touch on/off Lighting Button for Added Convenience. It also has a Three-Position Adjustable Breathing Mode and a Four-Position Adjustable Brightness Lighting Mode
  • 【Mechanical Feeling & Fast Tapping】The PC Keyboard Keys are Designed for Mechanical Feeling, Giving You a Better Feel During Use and the Ability to Trigger Keys Quickly, Allowing You to Win All Your Games
  • 【19 Keys Anti-Ghosting Keyboard】Anti-Ghosting Ensures Every Button Can Be Triggered. This Allows You to Trigger Key Combinations In The Game Accurately, And Each Skill Can Be Accurately Released to Increase Your Winning Rate. Redragon K521 Will Be Your Perfect Partner
  • 【12 Multimedia Combination Keys】The K521 Wired Gaming Keyboard is Equipped with 12 Multimedia Keys That Can Greatly Enhance Your Gaming/Office Efficiency and Make It More Convenient to Use

Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.

Performance, reliability, and cost considerations

For local development

  • Keep the preview beside the editor so visual regressions are noticed immediately.
  • Use Live Preview for rapid edits, but save files deliberately when you want a stable capture.
  • Capture a viewport for quick feedback and reserve full-page capture for documentation or review.

For automated or large-volume work

  • Set an explicit wait condition for pages that render asynchronously.
  • Use a cache TTL when identical captures can be reused, and inspect the billing headers in responses.
  • Use bulk capture for up to 100 URLs per call rather than starting one request per page.
  • Use asynchronous jobs and signed webhooks when a page takes longer than an interactive request.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting checklist

Preview is blank

Confirm that the HTML file is saved, the correct file is open, and the document contains visible body content. If scripts build the page, test a static element first; a script blocked by the preview’s security model can leave an otherwise valid document empty.

Images or fonts do not appear

Check relative URLs, filename case, and whether the resource uses an insecure HTTP URL. Markdown preview may block insecure resources, and browser-based environments can impose additional restrictions.

Screenshot is clipped

Viewport and area commands capture only what is visible or selected. Scroll to the required state, enlarge the viewport, or use the experimental full-page command. For a dependable long-page capture, use ScreenshotNeo’s full-page option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

JavaScript behaves differently

Do not infer normal browser behavior from Live HTML Previewer, whose listing says JavaScript is unsupported. Test interactive pages in Integrated Browser or Live Preview instead.

Best Value
Sale
Logitech K270 Full Size Wireless Keyboard for Windows - Black
  • All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
  • Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
  • Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
  • Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
  • Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later

ScreenshotNeo reports a non-clean result

Read X-Page-Verdict and X-Billed. A bot check, blank page, timeout, or failed load is not billed; fix the target page or wait conditions before retrying. Cache hits are also not billed.

Practical decision guide

  • One local file: Integrated Browser.
  • Continuous HTML/CSS editing: Microsoft Live Preview.
  • Viewport feedback for a conversation: Add Screenshot to Chat.
  • One component: Add Area Screenshot to Chat.
  • Long, repeatable, or remote captures: ScreenshotNeo.
  • Markdown documentation: built-in Markdown preview with markdown.styles.

Frequently Asked Questions

Can I preview HTML in VS Code without installing an extension?

Yes. Open the file in VS Code’s Integrated Browser. Install Microsoft Live Preview when you specifically need a local server with automatic reload.

Does the Integrated Browser save screenshots as image files?

The documented commands capture or attach the viewport and selected areas. They do not establish a guaranteed standalone image-file export dialog or format for every VS Code release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why is my CSS file ignored?

Usually the stylesheet path, filename case, save state, or cascade is wrong. Verify the relative href, save both files, and use a temporary outline rule to confirm that the file loads.

Is full-page screenshot capture stable in VS Code?

The full-page command is documented as experimental. For production or automated full-page captures, use a dedicated capture service such as ScreenshotNeo.

Quick Recap

Bestseller No. 1
SaleBestseller No. 3
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
Logitech K120 Full Size Wired Keyboard USB Plug-and-Play Windows - Black
Plastic parts in K120 include 51% certified post-consumer recycled plastic*; Product carbon footprint: 4.02 kg CO2e
$12.34
SaleBestseller No. 5
Logitech K270 Full Size Wireless Keyboard for Windows - Black
Logitech K270 Full Size Wireless Keyboard for Windows - Black
Plastic parts in K270 include 38% certified post-consumer recycled plastic; Eight hot keys: For instant access to the Internet, e-mail, music volume and more
$21.48

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.