Skip to main content
HTML Validation

Bad value X for attribute “src” on element “img”: Backslash ("\") used as path segment delimiter.

About This HTML Issue

This error message indicates that there is a backslash (\) used in a URL, which is not a valid character for URL paths.

You’ll need to replace the backslashes with forward slashes (/) in the URL path segments.

Here’s an example of a correct img tag using a valid URL path:

<img src="https://example.com/img/small/photo.png" alt="example image">

Also, make sure that the URL is correct and that the image file actually exists in the specified location.

Last reviewed: May 30, 2023

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.