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 position

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.

Play button theme

Light theme play button layered on a light-colored thumbnail image

A light theme play button should be used if the thumbnail image has a light color palette, and a dark theme play button should be used against dark thumbnails.

Dark theme play button layered on a light-colored thumbnail image

Do not use a dark theme play button over a thumbnail with mostly light colors, and vice versa.

Aspect Ratio

Video embed with a correctly resized thumbnail image

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

Video embed with a narrow aspect ratio, causing the thumbnail to look distorted

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