Skip to main content

HTML Guide

Bad value “” for attribute “src” on element “source”: Must be non-empty.

An empty src attribute on a source element is invalid; it must contain a valid non-empty URL.

The source element is typically used within audio or video elements to specify multiple media source files. The src attribute defines the path to the media file, and it must not be empty, as per the HTML standard.

Incorrect Example:

<video controls>
  <source src="" type="video/mp4">
  Your browser does not support the video tag.
</video>

Corrected Example:

<video controls>
  <source src="movie.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

Always ensure the src attribute on source is present and contains a valid, non-empty URL.

Learn more:

Related W3C validator issues