Iframes in HTML ka use ek web page ke andar dusra web page display karne ke liye hota hai.
HTML <iframe> tag ek inline frame define karta hai. Inline frame ka use current HTML document ke andar kisi aur document ko embed karne ke liye kiya jata hai.
Syntax of <iframe>
Iframes in HTML ka basic syntax yeh hota hai:
Yahaan src attribute us web page ka URL specify karta hai jo iframe ke andar display hoga.
Tip: <iframe> ke saath title attribute use karna good practice hai, kyunki yeh screen readers ko iframe content samajhne me help karta hai.
Example:
Iframe Set Height and Width
Iframes in HTML me height aur width attributes ka use iframe ka size specify karne ke liye hota hai.
Default me height aur width pixels (px) me hoti hai.
Example:
Using CSS for Height and Width
Aap style attribute ke through CSS properties bhi use kar sakte ho.
Example:
Iframe Remove the Border
Iframes in HTML me by default iframe ke around border hota hai.
Border remove karne ke liye CSS border property use kar sakte hain.
Example:
Is example me iframe without border display hoga.
Iframe Target for a Link
Iframes in HTML ko link ke target frame ke roop me bhi use kiya ja sakta hai.
Iske liye:
-
iframe ko name attribute diya jata hai
-
link ka target attribute us name ko refer karta hai
Example:

Jab user link par click karega to webpage iframe ke andar open hoga, na ki new tab me.
Is tarah Iframes in HTML ek powerful feature hai jo web pages ko dusre web pages ya external content ko embed karne ki facility deta hai, jisse information ko ek hi page ke andar easily display kiya ja sakta hai.