iFrame in HTML

An <iframe> (Inline Frame) is used to embed another webpage, video, or content inside the current HTML document. Unlike <frameset>, which is deprecated, <iframe> is still widely used in modern web development.

Basic Example of <iframe>

<iframe src="https://www.example.com" width="600" height="400"></iframe>

Common Attributes of <iframe>

AttributeDescriptionExample
srcURL of the embedded page<iframe src="page.html">
widthWidth of the iframe (in px or %)<iframe width="800">
heightHeight of the iframe<iframe height="500">
frameborderAdds/removes border (0 = No, 1 = Yes)<iframe frameborder="0">
allowfullscreenEnables fullscreen mode<iframe allowfullscreen>
nameAssigns a name to the iframe<iframe name="myFrame">

Embedding YouTube Videos 

<iframe width="560" height="315" 
        src="https://www.youtube.com/embed/dQw4w9WgXcQ" 
        frameborder="0" 
        allowfullscreen>
</iframe>
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad