<iframe> Tag Examples
Examples of the <iframe> tag in HTML 5
It is this easy to embed a YouTube video in HTML 5
(see Embedded YouTube video demo above)
<iframe class="youtube-player" width="640" height="480" src="http://www.YouTube.com/embed/GGT8ZCTBoBA"></iframe>
This is the "new" YouTube embed code. (The "old" YouTube embed code used the <object> tag. The 640 x 480 pixel size for the iframe is determined as follows:
- 640 x 45 pixel black bar above video
- 640 x 360 pixel video
- 640 x 45 pixel black bar below video
- 640 x 30 pixel tool bar at bottom