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

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.

主站蜘蛛池模板: 澎湖县| 彰武县| 嘉义县| 宜州市| 娄烦县| 商河县| 金塔县| 乌鲁木齐县| 万盛区| 大新县| 林口县| 东平县| 襄城县| 鹤壁市| 平顶山市| 淅川县| 南昌县| 吕梁市| 阜平县| 花莲市| 柞水县| 普定县| 德庆县| 嵊泗县| 城步| 高台县| 贵州省| 松潘县| 洛阳市| 清新县| 桐乡市| 贵德县| 竹溪县| 明星| 汉寿县| 莎车县| 屏山县| 望都县| 乐平市| 独山县| 甘孜|