HTML and CSS Reference
In-Depth Information
Figure1-3.Video playing in IE9 in compatibility mode, triggering the YouTube fallback
Before I return to the media elements, there is one more attribute supported on the
source
element, though it is rarely used: the
media
attribute. The
media
attribute provides the inten-
ded media source for the element. The default value is
all
, which means the media file is
intended for all media sources. There are several other allowable values, but the two that make
most sense (other than
all
) for media elements, especially video, are
handheld
and
screen
.
In combination with mediaqueriesin CSS, one can have a web page serve both desktop and
handheld devices.