--- title: "Liquid filters: external_video_tag" description: |- Generates an HTML ` ``` ### HTML attributes ```oobleck variable | external_video_tag: attribute: string ``` You can specify [HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attributes) by adding a parameter that matches the attribute name, and the desired value. ```liquid {% for media in product.media %} {% if media.media_type == 'external_video' %} {% if media.host == 'youtube' %} {{ media | external_video_url: color: 'white' | external_video_tag: class:'youtube-video' }} {% endif %} {% endif %} {% endfor %} ``` ##### Code ``` {% for media in product.media %} {% if media.media_type == 'external_video' %} {% if media.host == 'youtube' %} {{ media | external_video_url: color: 'white' | external_video_tag: class:'youtube-video' }} {% endif %} {% endif %} {% endfor %} ``` ##### Data ``` { "product": { "media": [ { "host": "youtube", "media_type": "external_video" }, { "host": null, "media_type": "video" } ] } } ``` ## Output ```html ```