Is there a way to set the modestbranding and color of a YouTube video element in Webflow, either through the UI or via custom code?

TL;DR
  • Access YouTube video in Webflow, replace with an Embed element, and insert custom HTML with desired parameters.
  • Configure YouTube URL with parameters like modestbranding=1 and color=white in the Embed element.
  • Publish and test the site to ensure customization and compatibility.

To modify the modestbranding and color attributes of a YouTube video in Webflow, you will need to use custom code, as these options are not available directly through the Webflow UI. Here's how you can do it:

1. Access the Embed Element in Webflow

  • Locate your YouTube video element within your Webflow project.
  • Replace it with an Embed element, allowing you to insert custom HTML.

2. Configure the YouTube Embed URL

  • Replace the default YouTube URL with one that includes desired parameters like modestbranding and color.
  • Example format: https://www.youtube.com/embed/VIDEO_ID?modestbranding=1&color=white

3. Add the Custom Code

  • In the Embed element, input your custom HTML like:

  ```html

  <iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID?modestbranding=1&color=white" frameborder="0" allowfullscreen loading="lazy"></iframe>

  ```

  • Replace VIDEO_ID with the actual ID of your YouTube video.

4. Ensure Parameter Inclusion

  • Make sure parameters like modestbranding=1 (which hides the YouTube logo) and color=white are included in the URL.
  • Note that color only affects the video player’s control bar and can either be red or white.

5. Publish and Test Your Site

  • Publish your site to see the customizations in effect.
  • Test on different devices and browsers to ensure compatibility.

Summary

To set the modestbranding and color of a YouTube video in Webflow, embed the video using an Embed element with custom URL parameters like modestbranding=1 and color=white. This customization is done via custom HTML in Webflow's Embed element.

Rate this answer

Other Webflow Questions