image of blog Mukesh Saini

HubSpot CMS Developer

1 Minutes Read

Listen to the Blog

Last Updated: 22-12-2025
Learn How to Embed YouTube, Maps, and iFrames
0:52

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:

  1. Open any location on Google Maps
  2. Click Share → Embed a map
  3. 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