Описание тега src
Within HTML, several elements may make use of the src
attribute in order to identify a resource to which the element may relate. It is normally a "valid non-empty URL potentially surrounded by spaces".
Questions often arise relating to the attribute due to confusion between absolute and relative URLs, how src
URLs relate to the location of css files, and browser caching.
Some examples of elements which use the src
attribute are:
Specifies a URL referencing a non-interactive, optionally animated, image that is neither paged nor scripted.
Gives the address of a page that the nested browsing context is to contain.
Gives the address of the external script resource to use.
Gives the address of the resource being embedded.
The URL for the video.
The URL for the audio stream.
Gives the address of the timed track data. This attribute must be present.
There are other elements which may make use of the src
attribute, which may be discovered at the W3C Community Wiki.
Related tags: img, iframe, javascript, html5, css