iFrames

What is an iFrame?


An iFrame (inline Frame) is an HTML element used to embed content from one website into another. It can include various types of content, such as HTML documents, videos, maps, and more.

A Title is Required

When you add an <iframe>, you must include a title attribute. This title should describe the content of the frame, helping users of screen readers understand its purpose.

Example:

<iframe title="Product Demonstration Video" src="https://www.martin.fl.us/productdemonstrationvideo.html"></iframe>

Best Practices

  1. Allow scrolling: 
    • Users should be able to scroll within iframes.
  2. Prevent keyboard traps: 
    • Ensure users can navigate out of frames or iframes without issues.
  3. Design for responsiveness
    • Iframes should be designed to be responsive and should adjust correctly when the page is resized.