To validate image HTML, submit your page or fragment to the W3C Markup Validation Service by URL, file upload, or pasted markup. For automated modern-HTML checks, use the Nu Html Checker service, API, or command-line workflow. Then resolve image-specific messages—especially src/srcset and alt—and separately test whether the image loads, looks correct, and is accessible.
Choose the validation route that fits your page
The validator you choose depends mainly on where the HTML lives and whether the check is occasional or repeatable. These are different input workflows, not a ranking of speed or quality.
| Workflow | Use it when | What it provides |
|---|---|---|
| W3C service by URI | Your document is publicly reachable and you want a quick web check. | Validation of the document fetched from its URL. |
| W3C service by upload or direct input | The file is local or private, or you need to check a fragment. | Upload a document or paste markup, including a fragment, without publishing it. |
| Nu Html Checker service, API, or command line | You want modern HTML checks in a development or continuous-integration workflow. | Documented browser, API, and command-line usage; its maintainers note that behavior remains subject to change. |
The W3C documentation describes the Markup Validation Service’s URI, upload, and direct-input modes and points modern HTML API users toward the HTML Checker. The Nu Html Checker project likewise documents service and command-line use. Check the current instructions before wiring a build around it because the project describes itself as an ongoing experiment whose behavior can change.
Validate an image in five steps
-
Open the validator and select an input method
For a deployed page, open the W3C Markup Validation Service, choose URI validation, enter the complete page address, and submit it. For local or confidential HTML, choose file upload or direct input instead. Direct input is also the practical choice for a standalone
<img>fragment.Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Locate every image element in the reported source
Read each message’s line, element, and attribute rather than treating the page as one undifferentiated error. An image embedded with HTML uses the
imgelement. The HTML Standard states: “To embed an image in HTML, when there is only a single image resource, use theimgelement and itssrcattribute.”For conformance, an
imgelement must have at least one ofsrcorsrcset. Ifsrcis present, it must contain a nonempty, valid URL for an image resource. These requirements are described in the HTML Standard’s image section. -
Review the source URL or source set
Check that the attribute is actually on the
imgelement, has not been left empty by a template, and contains the intended URL. If you use responsive images, confirm that the element has a usablesrcsetor a fallbacksrcas appropriate to your markup. A validator checks the markup rules; it does not prove that every remote URL will respond successfully from a user’s network. -
Decide what alternative text the image needs
An
altmessage is not merely a demand to describe visible pixels. For an image that conveys meaning, provide text that communicates the equivalent or replacement information. If important words are baked into the image, the alternative may need to represent those words. Decorative images require a different treatment, so use the contextual guidance in the HTML Standard’s developer image guidance and WAI’s H37 technique foraltattributes instead of applying a rule such as “describe every picture.”The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Correct the markup and run the check again
Make one focused correction, submit the same URL, file, or fragment again, and confirm that the message has disappeared without introducing a new one. Keep the final HTML source that the validator actually checked; a different generated template or cached deployment can produce a different result.
Image messages that deserve a closer look
Missing src and srcset
If an img has neither attribute, it does not identify an image resource in the way required by the HTML Standard. Add the source that matches your design. A single-resource image normally uses src; responsive markup can use srcset, with the surrounding attributes selected for the intended rendering behavior.
An empty or malformed src
A present src cannot be empty and must be a valid image URL. Inspect templating variables, quotation marks, URL encoding, and accidental whitespace. If the value is generated, inspect the rendered HTML rather than only the template file.
An alt warning
Read the surrounding content and the image’s purpose before editing the attribute. A meaningful chart, button, diagram, or photograph may need a concise equivalent; an image that repeats nearby text may need a different alternative; a purely decorative image should not receive invented information. The validator can flag the markup condition, but deciding what users need conveyed is an accessibility review.
Free tools Windows power users keep installed
One-click scans. No signup required.
Messages on attributes you did not expect
Use the reported element and attribute to find the exact source. Do not “fix” an image warning by moving text into a filename or by deleting an attribute without checking the HTML Standard’s image guidance. Resolve the conformance issue in the element that generated it, then validate again.
Automate checks with the Nu Html Checker
When image markup is produced on every build, a browser form is easy to forget. W3C’s user documentation directs developers seeking programmatic modern-HTML validation to the HTML Checker. The Nu Html Checker project documentation describes its browser-based service, API, and command-line options, and the project source is maintained at github.com/nist/Nu-HTML-validator.
Rank #3
Use the documented interface for the version you install rather than hard-coding an endpoint copied from an old example. Treat a changed warning as a signal to inspect the project’s current behavior and release notes: the maintainers explicitly describe v.Nu as an ongoing experiment whose behavior remains subject to change.
A practical CI sequence
- Build the page exactly as it will be deployed, including server-side or client-side generated image attributes.
- Pass the resulting document to the Nu Html Checker using the service, API, or command-line method documented for your installation.
- Fail or warn according to your team’s policy, but preserve the checker’s element and line details in the build log.
- Open the generated HTML for any
imgmessage and inspectsrc,srcset, andaltin context. - Rebuild and rerun the same check after the correction.
What a clean validation result does not prove
Markup conformance is one layer of quality. A successful result does not establish that the referenced file can be fetched, that the browser displays the intended pixels, or that the page has complete accessibility conformance. Keep these checks separate:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors- Availability: request the image through the same deployment path and confirm that the resource is reachable. A valid-looking URL can still point to a missing, blocked, or temporarily unavailable file.
- Visual correctness: open the page at the viewport sizes and themes your users use. Check cropping, intrinsic dimensions, responsive selection, transparency, and any transformations applied by CSS or JavaScript.
- Meaning and accessibility: ask whether the alternative communicates the image’s purpose in the page, whether text in the pixels is available in an equivalent form, and whether decorative content has been treated as decorative.
- Runtime output: inspect the final DOM when a framework changes attributes after load. The source file you edited may not be the markup the validator or browser receives.
The distinction follows from the validator’s markup-validity scope and from the HTML and WAI guidance, which address image semantics and alternatives separately from network delivery and visual testing.
Troubleshoot common validation problems
The validator cannot fetch my URL
A URI workflow requires a publicly reachable document. If the page is behind authentication, on a laptop, or still being edited, use file upload or direct input in the W3C service. For a private page, validate the generated file locally or use a documented Nu Html Checker installation instead of publishing a temporary copy.
I fixed the tag but the warning remains
Confirm that you submitted the updated document and that the validator is looking at the same path you edited. A deployment cache, redirect, or server-side template can leave the old markup at the submitted URL. Copy the reported line from the validator and compare it with the fetched source.
The image loads in my browser but validation still reports an error
Loading success does not override a conformance error. Browsers often recover from malformed markup, while a validator reports the requirement that was not met. Correct the element or attribute the message identifies, then separately keep your browser test for availability and appearance.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →The validator is clean but the image is broken
That is a delivery or runtime problem rather than proof of invalid HTML. Check the final URL, server response, access controls, content type, redirects, and the browser’s network and console information. None of those outcomes can be inferred from a clean markup result alone.
I do not know what to put in alt
Write the information a user needs from the image in that location, not a generic inventory of visual details. If the image adds no information and is only decoration, follow the contextual HTML and WAI guidance rather than adding misleading text. When the image duplicates adjacent prose, make sure the alternative does not create a redundant or contradictory announcement.
Our automated results changed after an update
Review the current Nu Html Checker documentation and the exact version used by the build. Its maintainers say the checker’s behavior is subject to change, so record the tool version and rerun the failing document against the same version while you investigate.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a rendering and capture service, not an HTML conformance validator. Use a validator for src, srcset, and alt rules; use a screenshot after that when you need a repeatable visual check of the deployed page. ScreenshotNeo accepts one GET request and returns a PNG, JPEG, WebP, or PDF. Its capture options include full-page shots with lazy images loaded, a CSS-selected element, dark mode, device presets or custom viewports, retina scale, custom CSS and JavaScript, selector hiding, waits for a selector, delay or network idle, request and resource blocking, cookies and headers, timezone and geolocation, transparent backgrounds, resizing, a chosen cache TTL, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, and a usage API. Every feature is available on every plan.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
Use the ScreenshotNeo API documentation for parameters and authentication. This cURL request captures a page as a WebP file:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
The equivalent Python request is:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And in Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Before capture, ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free. Create a free ScreenshotNeo account to try the visual check after your HTML validation.
A compact validation checklist
- Choose URI, upload, direct input, or an automated Nu Html Checker workflow based on where the HTML lives.
- Confirm every
imghas at least one ofsrcorsrcset. - Ensure any present
srcis nonempty and a valid image URL. - Review
altaccording to the image’s purpose and surrounding content. - Revalidate the corrected source.
- Separately test reachability, rendered appearance, and accessibility meaning.
Frequently Asked Questions
Can I validate only an image tag instead of a whole page?
Yes. The W3C Markup Validation Service’s direct-input workflow supports fragment validation, so you can paste the relevant markup without submitting a complete document.
Is a screenshot service a replacement for an HTML validator?
No. A screenshot shows rendered output; it does not establish HTML conformance. Validate the markup first, then use a capture service for visual or regression checks.
Should I rely on the validator to test whether an image URL is online?
No. A valid URL in conforming markup can still be unreachable or return the wrong resource. Check delivery and browser rendering separately.
Quick Recap
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.




