Deprecated in HTML5. Do not use.

<img dynsrc="">

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
HTML Tags Guide To Adding Images To Your Web Documents
What does <img dynsrc=""> do?
An early failed attempt to include native video playback in HTML.

An Early Attempt at HTML Video

The dynsrc attribute was part of an early failed attempt to include native video playback in HTML. The idea was to overload the <img> element with a video file, defined in dynsrc (dynamic source). If the browser supported the playback feature, the video would be shown. Otherwise, the regular image defined in src would be displayed.

<img src="flamingo.jpg" dynsrc="flamingo-movie"> 

Unfortunately, there were problems with this method. Not all browsers implemented it, and those that did implemented it differently. Most of all, the problem was simply that it wasn’t the right time for widespread use of HTML video — download speeds were still slow, storage and bandwidth were still expensive, video was still hard to produce. The ‘dynsrc` method never really caught on, and the attribute was written out of the HTML specification even before HTML5.

How to Embed Video in HTML Today

With HTML5, embedding video is as easy as using the <video> element.

<video controls>    <!-- Define one or more source files. The browser selects the best option. -->   <source src="/wp-content/uploads/flamingo-movie.mp4" type="video/mp4">    <!-- Anything outside of a source definition is shown if playback fails. -->   Your browser does not support the video tag. </video> 
#video-1 { padding: 0; } #video-1 video { max-width: 100%; height: auto; } #video-1 p { margin: 0; }

To learn more about HTML5 Video, see our tutorial on HTML5 Media, as well as our page about the <video> element.

Adam is a technical writer who specializes in developer documentation and tutorials.