官术网_书友最值得收藏!

Embedding an HTML object

In a product description, we can add HTML tags so that we can use the <object> tag. With an <object> tag, we can embed widgets, such as a YouTube video, social widgets, and more.

In this recipe, we will focus on how to add a YouTube video in a product description.

Getting ready

Go to http://www.youtube.com, and choose a video that you want to show on the product detail page.

How to do it

The next steps shows you how to embed a YouTube video on a product detail page.

  1. On the YouTube video page, click on the Embed button. When you click this button, the following screen shows up:
  2. Copy the HTML code and paste it in the description of the product.
  3. Save the product.
  4. Go to the product in the frontend. You will see the video on the Product page.

How it works

The ability to use HTML tags in product descriptions gives a lot of flexibility for this field. It is possible to use a WYSIWYG editor for the content because this allows us to use widgets, such as a YouTube video or other third-party widgets.

On a YouTube video page, we opened the embed options where we can configure the code that we will include in our site. We can specify options such as width, height, color and more.

When everything is configured, we can paste the Embed code in the HTML of the product description, and the video will be visible in the description of the product.

主站蜘蛛池模板: 中江县| 丰台区| 霍州市| 台北县| 绥江县| 台前县| 浮梁县| 唐河县| 湖州市| 买车| 紫阳县| 兴业县| 长泰县| 游戏| 松潘县| 玉环县| 寿宁县| 准格尔旗| 河北区| 黎平县| 呼伦贝尔市| 镇康县| 镇安县| 精河县| 林州市| 常德市| 临高县| 山阳县| 清涧县| 星座| 微博| 资源县| 家居| 博客| 若羌县| 公主岭市| 来凤县| 正安县| 正宁县| 张掖市| 甘谷县|