src attribute

The HTML attribute that gives the URL of an external resource to load, as on script, img and iframe elements.

In more detail

A script with src loads code from that URL, which Content Security Policy checks against its allowlist. The -src suffix in directive names such as script-src echoes this attribute.

Related terms

Taught in

References