-->

  • HTML iframe tag


    Kumar Atul Jaiswal
    HTML  Iframe



    HTML Iframe 

    An iframe is used to display a web page within a web page.

    HTML Iframe creates an Inline frame for embedding third party contents (media, applets ect). The content of the frame and the web page are Independent, but they can interact through javascript.

    Not all browser support frames,  we must define an alternate text, which will be display to the user, if the browser cannot display the content of the frame.


    The src attribute is required for the <iframe> tag. It defines the URL of the document, which must be
    displayed in the frame.



    Syntax 


       <iframe src="https://www.kumaratuljaiswal.in"></iframe>   



    Example



    <!DOCTYPE html>
    <html>

    <head>

    <title>HTML Iframe Tag</title>

    </head>

    <body>

    <iframe src="https://www.kumaratuljaiswal.in"></iframe>


    </body>
    </html>



     Result 






                                         



    To set the size of iframe you can use the height and width attributes, or use CSS. The attribute values

    are set in pixels by default, but they can also be in percent.







    Example




    <!DOCTYPE html>
    <html>
    <head>

    <title>HTML Iframe Tag</title>

    </head>

    <body>


    <iframe src="https://www.kumaratuljaiswal.in"  width="60%;" height="380;"   ></iframe>


    </body>
    </html>





     Result 









                    



     
    By default, an iframe has a border around it. To remove the border, you can use the style attribute 

    and or CSS border property.





    Example




    <!DOCTYPE html>
    <html>
    <head>

    <title>HTML Iframe Tag</title>

    </head>

    <body>

    <iframe src="https://www.kumaratuljaiswal.in" style="width:80%; height:400px;"  style="border:none;"  ></iframe>


    </body>
    </html>





     Result 












                     


















  • 0 comments:

    Post a Comment

    For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.