About This HTML Issue
A space in the src URL of a <video> element is an illegal character, so write each space as %20 or rename the file without spaces.
The src attribute takes a valid URL, as defined by the URL Living Standard. Each folder name in the path is a path segment, and so is the file name. None of them can contain a literal space, so the validator flags my videos/demo.mp4 just as it flags videos/my demo.mp4.
Files uploaded through a CMS or copied from a desktop folder often keep the spaces in their names. Most browsers encode the space themselves and play the video anyway, but the markup is still invalid, and a strict URL parser may cut the address off at the first space.
The cleanest fix is to rename the file with hyphens or underscores and update src to match. If you can't rename it, replace each space with %20. The server decodes %20 back to a space, so it still finds the original file. The same rule applies to the src of a <source> element and to the poster attribute of <video>.
Invalid example
<video src="videos/product demo.mp4" controls></video>
Valid examples
<video src="videos/product%20demo.mp4" controls></video>
<video src="videos/product-demo.mp4" controls></video>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.