What is HTML == <iframe== > tag?

EnglishCreated with Sketch.
EnglishFrench
  • Join  Lenovo Pro Business Store

    Log In / Sign Up

    Learn More

  • Accessibility
  • Sales:

    Home:

    1-855-253-6686 Option #2

    Business:

    1-866-426-0911

    Chat Now >

    Visit Sales Support Page >


    Order Support:

    Order Lookup >

    Visit Order Support Page >

    Technical Support >

Lenovo
All
  • All
  • Laptops
  • Desktops
  • Workstations
  • Monitors
  • PC Accessories & Electronics
  • Tablets
  • Servers & Storage
  • Servers Accessories
  • Sign In / Create Account
    My Lenovo Account
    Keep track of your wishlist, orders, and rewards all in one place
    Sign In / Create Account
    Welcome Back!
    Access your order, subscriptions, saved carts, rewards balance, and profile
    View My Account
    Orders
    View & track your orders
    Rewards
    Earn & redeem Rewards
    Profile
    Edit name, password, and account settings
    Wishlist
    Manage a wishlist of your favorite products
    Products
    Manage your devices, accessories
    Product Registration
    Register your product and/or update your warranty dates
    Lenovo Family Hub
    Manage your family's orders all in one place
    Sign Out
  • My Lenovo Rewards
  • Cart
  • Products
  • Solutions
  • Services
  • Support
  • About Lenovo
  • Deals
  • Business
  • Student
  • Gaming
  • AI
  • Hybrid Cloud
  • Digital Workplace
  • Edge
  • Sustainability
  • TruScale
  • Solutions by Industry
  • Alliance Partners
  • Other Solutions
  • Resources
TEMPORARILY UNAVAILABLE
DISCONTINUED
Temporary Unavailable
Cooming Soon!
. Additional units will be charged at the non-eCoupon price. Purchase additional now
We're sorry, the maximum quantity you are able to buy at this amazing eCoupon price is
Sign in or Create an Account to Save Your Cart!
Sign in or Create an Account to Join Rewards
View Cart
Remove
Your cart is empty! Don’t miss out on the latest products and savings — find your next favorite laptop, PC, or accessory today.
item(s) in cart
Some items in your cart are no longer available. Please visit cart for more details.
has been deleted
Please review your cart as items have changed.
of
Contains Add-ons
Subtotal
Proceed to Checkout
Yes
No
Popular Searches
What are you looking for today ?
Trending
Recent Searches
Items
All
Cancel
Top Suggestions
View All >
Starting at
  • Black Friday in July! Limited-time Doorbusters + Free shipping!  Shop Now >

  • My Lenovo Rewards! Earn 3%-9% in Rewards to use on future purchases at Lenovo.com Join for Free >

  • Business Financing Available. Split payments from 4 to 52 weeks, options as low as 0% interest. See Details >

  • Shopping for a business? New Lenovo Pro members get $100 off first order of $1,000+, exclusive savings & 1:1 tech support. Learn More >

  • Lenovo Live with Deepi: Black Friday in July + exclusive offer revealed on 7/16 @ 7pm ET! Register Today >

Home > Glossary > What is HTML
Glossary Hero    
Learn More    
StarStar

Annual Sale

Lenovo Laptop SaleLenovo Laptop Sale

Laptop Deals

Desktop DealsDesktop Deals

Desktop Deals

Workstation DealsWorkstation Deals

Workstation Deals

ControllerController

Gaming PC & Accessory Deals

MouseMouse

PC Accessories & Electronics Deals

MonitorMonitor

Monitor Deals

Tablet and phoneTablet and phone

Tablets Deals

ServerServer

Server & Storage Deals

Discount tagDiscount tag

Clearance Sale


What is HTML <iframe> tag?

The HTML <iframe> tag is used to embed another HTML document within the current document. This means you can display another web page inside a small window on your webpage. It's a useful way to include content from other sources without redirecting the user to a new page.

Can I use the HTML <iframe> tag to embed videos?

Yes, you can use the HTML <iframe> tag to embed videos, such as those from YouTube or Vimeo. Simply copy the embed code provided by the video platform and place it within your <iframe> tag. This will allow the video to play directly on your page.

What attributes are available with the HTML <iframe> tag?

The HTML `<iframe>` tag supports several attributes that control its behavior and appearance. Key attributes include `src`, which specifies the URL of the page to display within the iframe, and `width` and `height` to define its dimensions. The `title` attribute provides a text description for accessibility. The `allow` attribute grants specific permissions like fullscreen or autoplay. The `sandbox` attribute adds restrictions for enhanced security. Additionally, `allowfullscreen` enables fullscreen mode, while `loading` allows lazy loading for performance optimization. The `frameborder` and `scrolling` attributes, though deprecated, were previously used to control borders and scrolling. Together, these attributes provide flexibility for embedding content.

Does the HTML <iframe> tag impact page performance?

The HTML <iframe> tag can impact page performance. If the embedded content is heavy with scripts, images, or multimedia, it may slow down your page load time. However, careful management and optimization can mitigate most issues.

How can I make an iframe responsive using the HTML <iframe> tag?

To make an iframe responsive using the HTML <iframe> tag, you can apply CSS styles to adjust its size relative to the screen or parent element. A common approach is wrapping the iframe in a div and using CSS to set the width and height to 100%.

Can I apply CSS styles directly to the content within the HTML <iframe> tag?

No, you cannot directly apply CSS styles to the content within the HTML <iframe> tag from the parent document. The iframe content is a separate document with its own styles. You must access the iframe's document using JavaScript to apply styles if needed.

What security risks are associated with using the HTML <iframe> tag?

Using the HTML <iframe> tag can introduce security risks, such as cross-site scripting (XSS) attacks. To mitigate these risks, use attributes like sandbox and ensure that the embedded content source is trustworthy and secure.

Can I communicate between the parent document and the HTML <iframe> tag?

Yes, you can communicate between the parent document and the HTML <iframe> tag using the postMessage() method in JavaScript. This allows you to send and receive messages between the two documents, enabling dynamic interactions.

How do I set the source URL for the HTML <iframe> tag?

To set the source URL for the HTML <iframe> tag, use the src attribute. For example, <iframe src="https://www.example.com"></iframe> will embed the https://www.example.com webpage within your iframe.

Is it possible to navigate within an iframe using HTML <iframe> tag?

Yes, it's possible to navigate within an iframe using the HTML <iframe> tag. You can set the src attribute to a new URL dynamically using JavaScript, or users can interact with links within the iframe to navigate.

Does the HTML <iframe> tag support accessibility features?

The HTML <iframe> tag supports accessibility features, such as the title attribute, which provides a text description for screen readers. Using this attribute helps improve the accessibility of your embedded content.

Can I nest iframes within another iframe using the HTML <iframe> tag?

Yes, you can nest iframes within another iframe using the HTML <iframe> tag. However, this can complicate the document structure and impact performance, so it's generally best to avoid unless necessary.

What is the sandbox attribute of the HTML <iframe> tag?

The sandbox attribute of the HTML <iframe> tag is used to impose restrictions on the iframe content. It enhances security by controlling actions like form submission, script execution, and top-level navigation within the embedded content.

How can I allow fullscreen mode for an iframe using the HTML <iframe> tag?

To allow fullscreen mode for an iframe using the HTML <iframe> tag, add the allowfullscreen attribute to your iframe. This enables the fullscreen button, allowing users to expand the content to fill their screen.

What is the purpose of the name attribute in the HTML <iframe> tag?

The name attribute in the HTML <iframe>  tag is used to assign a name to the iframe. This name can be referenced in links or scripts to target the iframe and control its behavior, such as navigating to a new page or applying settings.

Can I control scrolling within an iframe using the HTML <iframe>  tag?

Yes, you can control scrolling within an iframe using the HTML <iframe>  tag by using the scrolling attribute. However, this attribute is deprecated in HTML5. Instead, use CSS properties like overflow to manage iframe scrolling.

Is it possible to embed interactive maps using the HTML <iframe>  tag?

Yes, it's possible to embed interactive maps using the HTML <iframe>  tag. You can integrate maps from services like Google Maps by using the provided iframe embed code. This allows users to interact with the map directly on your webpage.

How do I change the size of an iframe using the HTML <iframe>  tag?

To change the size of an iframe using the HTML <iframe>  tag, use the width and height attributes. You can specify the dimensions in pixels or percentages, such as <iframe width="600" height="400"> </iframe>  to set a 600x400 pixel iframe.

What is the allow attribute in the HTML <iframe>  tag used for?

The allow attribute in the HTML <iframe>  tag is used to specify permissions for the embedded content. You can control features like microphone access, camera access, autoplay, and more by setting appropriate values in the allow attribute.

What is the srcdoc attribute in the HTML <iframe>  tag?

The srcdoc attribute in the HTML <iframe>  tag allows you to embed HTML content directly within the iframe element itself, instead of using an external URL. This can be useful for embedding snippets of HTML code without requiring an external file. For example: `<iframe srcdoc="<p> Hello, World!</p> "> </iframe> `.

Looking for a Great Deal?
Shop Lenovo.com for great deals on A+ Education PCs, Accessories, Bundles and more.
Shop Deals Now

  • ThinkPad X9 15 Aura Edition (15ʺ Intel) Laptop
    Starting at
    $1,720.40
    Learn More
  • Yoga 9i 2-in-1 Aura Edition (14″ Intel) Laptop
    Starting at
    $1,736.99
    Learn More
  • IdeaPad Pro 5 (16” AMD) Laptop
    Starting at
    $1,099.99
    Learn More
  • ThinkPad P1 Gen 7 (16″ Intel) Mobile Workstation
    Starting at
    $4,399.00
    Learn More
  • Lenovo Slim 7i Aura Edition (14” Intel) Laptop
    Starting at
    $1,108.79
    Learn More
  • Shop
    • Student Deals
    • K-12 Student Laptops
    • Student Accessories
    • Laptops by Major
    Education resource
    Explore
    • What is STEM?
    • Best Laptops for College
    • Student & Teacher Discounts
    • Lenovo Sustainability Programs
    Education carry case

    Stem Articles
    See All STEM Articles
    • Online STEM Education

    • STEM Career Tips & Resources

    • Women in STEM

    • STEM Educator Training

    • STEM Grants & Funding

    • STEM Education: Coding for Kids

    • STEM Education: Robotics

    • STEM Education: Biotechnology

    • STEM Education: Sustainability

    • STEM Education: AI & ML

    While every effort has been made to ensure accuracy, this glossary is provided for reference purposes only and may contain errors or inaccuracies. It serves as a general resource for understanding commonly used terms and concepts. For precise information or assistance regarding our products, we recommend visiting our dedicated support site, where our team is readily available to address any questions or concerns you may have.

    Why Lenovo?

    Go Greener with Leno...

    Lenovo is committed to Smarter Climate Action with lower energy laptops, use of sustainable materials and packaging, and available CO2 Offset Services.
    Learn More
    pastel background

    Get It Now, Pay For ...

    Lenovo has multiple financing option: the Lenovo Credit Card, installment plans, and lease-to-own financing op...
    Learn More
    pastel background

    Productivity & Peace of Mind

    Stay productive with Premium Care Plus - 24/7 priority support and coverage against accidental damage. Power through your day with our Smart Performance and extended battery solutions.
    Learn More
    pastel background

    My Lenovo Rewards

    Get up to 9% back in Rewards credit on all purchases! Join or Sign In to start earning today.
    Learn More
    pastel background

    Assistance and Suppo...

    Chat with a trained professional who can help you find the right products, place or check on an order, or setup your Education laptop.
    Contact Us
    pastel background
    Enter email to receive Lenovo marketing and promotional emails. Review our Privacy Statement for more details.
    Please enter the correct email address!
    Email address is required
    • Facebook
    • Twitter
    • Youtube
    • Pinterest
    • TikTok
    • instagram
    Select Country / Region:
    Country
    AndroidIOS

    About Lenovo

    • Our Company
    • News
    • Investors Relations
    • Compliance
    • ESG
    • Product Recycling
    • Product Security
    • Product Recalls
    • Executive Briefing Center
    • Lenovo Cares
    • Careers
    • Formula 1 Partnership

    Products & Services

    • Laptops & Ultrabooks
    • Smarter AI for You
    • Desktop Computers
    • Workstations
    • Gaming
    • Tablets & Smart Devices
    • Servers, Storage, & Networking
    • Accessories & Software
    • Services & Warranty
    • Product FAQs
    • Deals
    • Lenovo Coupons
    • Preconfigured Products

    Shop By Industry

    • Small Business Solutions
    • Large Enterprise Solutions
    • Healthcare Solutions
    • Higher Education Solutions
    • Education Discounts
    • Discount Programs

    Resources

    • Lenovo Pro for Business
    • My Lenovo Rewards
    • Lenovo Financing
    • Customer Discounts
    • Affiliate Program
    • Affinity Program
    • Employee Purchase Program
    • Lenovo Partner Hub
    • Laptop Buying Guide
    • Where to Buy
    • Glossary

    Customer Support

    • Contact Us
    • Shopping Help
    • Return Policy
    • Shipping Information
    • Track my Order
    • Register a Product
    • Replacement Parts
    • Technical Support
    • Forums
    • Provide Feedback
    © 2025 Lenovo. All rights reserved.
    PrivacySite MapTerms of UseExternal Submission PolicySales terms and conditionsAnti-Slavery and Human Trafficking Statement
    Compare  ()
    x
    Call

    Need Help? Call: 

    1-855-253-6686 Option #2
    Select Your Store
    Add items to your cart?
    We've noticed that you've entered a different store. Do you want to add these items to your cart in the new store?
    No Yes. Add in Lenovo Pro