Blog
Learn How to Embed YouTube, Maps, and iFrames
HubSpot CMS Developer
Listen to the Blog
Bring your web pages to life by embedding videos, maps, and other web content directly into HTML.
What Is an <iframe>?
An iframe (inline frame) lets you embed another web page inside your page. It’s commonly used for videos, maps, forms, or external tools.
Embedding a YouTube Video
YouTube provides an embed code you can paste into your HTML.
- Add allowfullscreen for full-screen viewing
- Use the /embed/ URL format
Embedding a Google Map
You can embed a map directly from Google Maps:
- Open any location on Google Maps
- Click Share → Embed a map
- Copy the <iframe> code and paste it into your HTML
Responsive iFrame Example
Make iframes scale automatically with screen size:
- Maintains aspect ratio (16:9)
- Fits any screen size
Security Tip
Add the sandbox attribute to limit what embedded content can do:
You can also control permissions like:
I'm Mukesh Saini, a seasoned HubSpot CMS Developer specializing in custom templates, seamless integrations, and high-performing digital experiences. Having honed his skills over several years in the industry, i possess a deep understanding of HubSpot's capabilities.
HubSpot CMS Developer
Related Post
You may also be interested in
-
Learn How to Use Divs, Spans, and Grouping Elements in HTML
Group and structure HTML content efficiently using and tags.
-
Learn How to Use Multimedia Attributes in HTML
Enhance videos and audio on your website with HTML attributes for better user experience.
-
Learn How to Create Links & Anchors in HTML
Add navigation and interactivity to your web pages with links.