HTML | <frame> marginwidth Attribute

The HTML <frame> marginwidth attribute is used to specifies the left and right margin of the content in an frame element.

Syntax:

<frame marginwidth="pixels">

Attribute Values:

    pixels: It contains single value pixels which specifies the right and left margin of the content in an frame element.

    Note: This attribute is not supported in HTML 5. CSS property is used instead of this attribute.

    Below example illustrates the <frame> marginwidth attribute in HTML:

    Example:




    <!DOCTYPE html> 
    <html
      
    <head
        <title>
            HTML frame marginWidth Attribute
        </title
    </head
      
    <frameset cols="30%, 40%, 30%"
          
        <frame name = "left" src =
    "https://media.w3wiki.net/wp-content/uploads/20190401113144/gfg_200X2001.png"/> 
          
        <frame name="middle" src=
    "https://media.w3wiki.net/wp-content/uploads/20190328185307/gfg28.png"
                marginwidth="30" /> 
          
        <frame name="right" src=
    "https://media.w3wiki.net/wp-content/uploads/20190807114330/GFG115.png"
            marginwidth="40" /> 
      
    </frameset
      
    </html>

    
    

    Output:

    Supported Browsers: The browsers supported by HTML <frame> marginwidth attribute are listed below:

    • Google Chrome
    • Internet Explorer
    • Firefox
    • Safari
    • Opera

Contact Us