Video embed

OverviewStyleGuidelinesCodeAccessibilityDemos

Usage

The video embed element shows a static preview of the video, and this allows the user to control what image is seen before the video is played. It also ensures that the video does not start playing automatically.

Thumbnails

For users that do not have advertising cookies enabled, the video embed element should display a standard cookie consent thumbnail. This thumbnail includes instructions to enable advertising cookies and a button that will trigger a cookie consent dialog window.

Check the Code subpage for information about attributes and events that will help you implement the cookie consent thumbnail and integrate it with the preferred cookie consent manager. View the Require Consent demo to see a standalone implementation of this functionality.

Video displaying the cookie consent which says, 'View this video by opting into Advertising Cookies.' It also has an 'Update Preferences button'.

Writing Content

Character Count

An optional descriptor caption can be placed underneath the video embed element. The recommended maximum character count is listed below and includes spaces.

Element Character count
Caption 150

Responsive Design

The video’s width will dynamically adjust with its parent container. The video embed element dimensions should retain the same aspect ratio as the original video. The caption font size will also remain the same across all screen or container sizes.

Large Viewport Sizes

Video embed with a semitransparent grid in the background. The video embed only spans half the columns.

Small Viewport sizes

Video embed with a semitransparent grid background on mobile. The video embed spans all columns on small viewports.

Best Practices

Play button

Display the play button in a consistent, predictable spot for all videos.

Video with vertically and horizontally centered play button

Keep the play button centered horizontally and vertically.

Video with play button in the bottom right

Do not move the play button to another area of the video element.

Aspect Ratio

A video embed element and should have the same aspect ratio as the video it’s displaying.

Video embed with a correct, 16:9 aspect ratio

The video embed element should display a video using its original aspect ratio.

Video embed with a very narrow aspect ratio

Do not change the aspect ratio of the video within the video embed element.