HTML and CSS Reference
In-Depth Information
Altering the Width and Height of the Video
In our first example, we showed how you could embed a video without changing the default
width or height. However, there are many good reasons why you might want to change the
default width and height of a video in the HTML page, such as fitting it into a particular
part of the page or enlarging it so that it is easier to see. Similar to embedding an image into
HTML with the <img> tag, a video will scale to whatever width and height you provide in
the <video> tag. Also, like with the <img> tag, this scale does not affect the size of the object
downloaded. If the video is 5 megabytes at 640×480, it will still be 5 megabytes when dis-
played at 180×120—just scaled to fit that size.
In Example 6-3 ( CH6EX3.html ), we have scaled the same video to three different sizes and
displayed them on the same page. Figure 6-3 shows what this looks like in HTML (again,
rendered in the Google Chrome browser).
Search WWH ::

Custom Search