- Magento 2 Development Cookbook
- Bart Delvaux
- 254字
- 2021-07-30 09:46:23
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.
- On the YouTube video page, click on the Embed button. When you click this button, the following screen shows up:
- Copy the HTML code and paste it in the description of the product.
- Save the product.
- 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.
- 精通Python自然語(yǔ)言處理
- 小程序開(kāi)發(fā)原理與實(shí)戰(zhàn)
- 網(wǎng)站構(gòu)建技術(shù)
- Teaching with Google Classroom
- C語(yǔ)言程序設(shè)計(jì)教程
- Mastering JavaScript High Performance
- 大數(shù)據(jù)分析與應(yīng)用實(shí)戰(zhàn):統(tǒng)計(jì)機(jī)器學(xué)習(xí)之?dāng)?shù)據(jù)導(dǎo)向編程
- Unity 2017 Mobile Game Development
- Python+Tableau數(shù)據(jù)可視化之美
- 零基礎(chǔ)學(xué)C語(yǔ)言第2版
- 深入理解C指針
- Lift Application Development Cookbook
- SwiftUI極簡(jiǎn)開(kāi)發(fā)
- PhoneGap 4 Mobile Application Development Cookbook
- Python大規(guī)模機(jī)器學(xué)習(xí)