HTML <iframe> marginheight and marginwidth Attribute

Example An <iframe> with a top and bottom margin of 50 pixels: <iframe src=”demo_iframe.htm” marginheight=”50″ marginwidth=”50″> </iframe> Try it Yourself » Definition and Usage The <iframe> marginheight and marginwidth attribute is not supported in HTML5. Use CSS instead. The marginheight and marginwidth attribute specifies the top and bottom margins  and left and right of the content of an <iframe> […]

HTML <iframe> height and width Attribute

Example An <iframe> with a specified height and width of 200 pixels: <iframe src=”/default.asp” width=”200″ height=”200″> </iframe> Try it Yourself » Definition and Usage The height attribute specifies the height of an <iframe>, in pixels and the width attribute specifies the width of an <iframe>, in pixels. Browser Support Attribute height and width Yes Yes Yes Yes Yes […]

HTML <iframe> frameborder Attribute

Example An <iframe> with no borders: <iframe src=”/default.asp” width=”200″ height=”200″ frameborder=”0″> </iframe> Try it Yourself » Definition and Usage The <iframe> frameborder attribute is not supported in HTML5. Use CSS instead. The frameborder attribute specifies whether or not to display a border around an <iframe>. Tip: It may be better to NOT specify a frameborder, and use CSS to apply borders instead. […]

HTML <iframe> align Attribute

Example A right-aligned <iframe>: <iframe src=”/default.asp” width=”300″ height=”300″ align=”right”> </iframe> Try it Yourself » Definition and Usage The align attribute specifies the alignment of an <iframe> according to the surrounding element. The <iframe> element is an inline element (it does not insert a new line on a page), meaning that text and other elements can wrap around it. Therefore, […]

HTML <iframe> Tag

Example An inline frame is marked up as follows: <iframe src=”https://dwfaisalabad.com”></iframe> Try it Yourself » Definition and Usage The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document. Browser Support Element <iframe> Yes Yes Yes Yes Yes Tips and Notes Tip: To deal with browsers that […]

HTML <i> Tag

Example <p>He named his car <i>The lightning</i>, because it was very fast.</p> Try it Yourself » Definition and Usage The <i> tag defines a part of text in an alternate voice or mood. The content of the <i> tag is usually displayed in italic. The <i> tag can be used to indicate a technical term, a […]

HTML <html> Tag

Example A simple HTML5 document: <!DOCTYPE HTML> <html> <head> <title>Title of the document</title> </head><body> The content of the document…… </body></html> Try it Yourself » Definition and Usage The <html> tag tells the browser that this is an HTML document. The <html> tag represents the root of an HTML document. The <html> tag is the container for […]

HTML <style> Tag

Example Use of the <style> element in an HTML document: <html> <head> <style> h1 {color:red;} p {color:blue;} </style> </head> <body><h1>A heading</h1> <p>A paragraph.</p></body> </html> Try it Yourself » Definition and Usage The <style> tag is used to define style information for an HTML document. Inside the <style> element you specify how HTML elements should render in a […]

HTML <link> Tag

Example Link to an external style sheet: <head> <link rel=”stylesheet” type=”text/css” href=”theme.css”> </head> Try it Yourself » Definition and Usage The <link> tag defines a link between a document and an external resource. The <link> tag is used to link to external style sheets. Browser Support When used for style sheets, the <link> tag is supported in all […]

HTML <meta> Tag

Example Describe metadata within an HTML document: <head> <meta charset=”UTF-8″> <meta name=”description” content=”Free Web tutorials”> <meta name=”keywords” content=”HTML,CSS,XML,JavaScript”> <meta name=”author” content=”John Doe”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> </head> Try it Yourself » Definition and Usage Metadata is data (information) about data. The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable. Meta elements […]

HTML DOM Heading Object

Heading Object The Heading object represents an HTML heading element: <h1> to <h6>. Access a Heading Object You can access a heading element by using getElementById(): Example var x = document.getElementById(“myHeading”); Try it Yourself » Create a Heading Object You can create a heading element by using the document.createElement() method: Example var x = document.createElement(“H1”); Try it […]

HTML <frame> frameborder Attribute

Example A two-framed page, with no frameborders: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” frameborder=”0″> <frame src=”frame_b.htm” frameborder=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The frameborder attribute specifies whether or not to display a border around a frame. Tip: For practical reasons, it may be better not to specify borders, and use CSS to […]

HTML <frame> Tag

Not Supported in HTML5 Example A simple three-framed page: <frameset cols=”25%,50%,25%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <frame> tag is not supported in HTML5. The <frame> tag defines one particular window (frame) within a <frameset>. Each <frame> in a <frameset> can have different attributes, such […]

HTML <frame> src Attribute

Example The src attribute specifies the location of the document to show in a <frame>: <frameset cols=”50%,50%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The src attribute specifies the URL of the document to show in a frame. Browser Support Attribute src Yes Yes Yes […]

HTML <frame> name Attribute

Example A named frame: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” name=”frame_a”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The name attribute specifies the name of a <frame> element. The name attribute is used to reference the element in a JavaScript, or to act as a target for a link. Browser […]

HTML <frame> scrolling Attribute

Example Frame A should always have scrollbars: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” scrolling=”yes”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The scrolling attribute specifies whether or not to display scrollbars in a <frame>. By default, scrollbars appear in a <frame> if the content is larger than the <frame>. Browser […]

HTML <frame> noresize Attribute

Example Frame A cannot be resized: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” noresize=”noresize”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The noresize attribute specifies that a <frame> element cannot be resized by the user. By default, each <frame> in a <frameset> can be resized by dragging the border between the […]

HTML <frame> marginwidth Attribute

Example The first frame with a left and right margin of 50 pixels, and the second frame with a left and right margin of 0 pixels: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” marginwidth=”50″> <frame src=”frame_b.htm” marginwidth=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The marginwidth attribute specifies the width between the content and […]

HTML <frame> longdesc Attribute

Example The longdesc attribute points to a page with a long description of the content of a frame: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” longdesc=”dw.txt”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The longdesc attribute specifies a URL to a page that contains a long description of the content of […]

HTML <frame> marginheight Attribute

Example The first frame with a top and bottom margin of 50 pixels, and the second frame with a top and bottom margin of 0 pixels: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” marginheight=”50″> <frame src=”frame_b.htm” marginheight=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The marginheight attribute specifies the height between the content and […]