HTML <iframe> scrolling Attribute

Example An <iframe> with scrollbars: <iframe src=”/default.asp” width=”300″ height=”300″ scrolling=”yes”> </iframe> Try it Yourself » Definition and Usage The <iframe> scrolling attribute is not supported in HTML5. Use CSS instead. The scrolling attribute specifies whether or not to display scrollbars in an <iframe>. Normally, scrollbars appear in an <iframe> when the content is larger than the <iframe>. Browser Support […]

HTML <iframe> sandbox Attribute

Example An <iframe> with extra restrictions: <iframe src=”sandbox.htm” sandbox></iframe> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The sandbox attribute enables an extra set of restrictions for the content in the iframe. When the sandbox attribute is present, and it will: treat the content as being from a unique origin block form […]

HTML <iframe> name Attribute

Example An <iframe> that act as a target for a link: <iframe src=”demo_iframe.htm” name=”iframe_a”></iframe> <a href=”https://dwfaisalabad.com” target=”iframe_a”> Visit DW </a> Try it Yourself » Definition and Usage The name attribute specifies a name for the <iframe>. This name attribute can be used to reference the element in a JavaScript, or as the value of the target attribute of an […]

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 <hr> width Attribute

Example A horizontal line with a width of 50%: <hr width=”50%”> Try it Yourself » Definition and Usage The width attribute specifies the width of a horizontal line, in pixels or percent. Browser Support Attribute width Yes Yes Yes Yes Yes The width attribute is deprecated, but still supported in all major browsers. Compatibility Notes The […]

HTML <hr> size Attribute

Example A horizontal line with a height of 30 pixels: <hr size=”30″> Try it Yourself » Definition and Usage The size attribute specifies the height of a horizontal line, in pixels. Browser Support Attribute size Yes Yes Yes Yes Yes The size attribute is deprecated, but still supported in all major browsers. Compatibility Notes The size […]

HTML <hr> noshade Attribute

Example A noshaded horizontal line: <hr noshade> Try it Yourself » Definition and Usage The noshade attribute is a boolean attribute. When present, it specifies that a horizontal line should render in one solid color (noshaded), instead of a shaded color. Browser Support Attribute noshade Yes Yes Yes Yes Yes The noshade attribute is deprecated, but […]

HTML <hr> align Attribute

Example A left-aligned horizontal line: <hr align=”left” width=”50%”> Try it Yourself » Definition and Usage The align attribute specifies the alignment of a horizontal line. Note: The align attribute has no effect unless the width attribute is set to less than 100%. Browser Support Attribute align Yes Yes Yes Yes Yes The align attribute is deprecated, but still […]

HTML <hr> Tag

Example Use the <hr> tag to define a thematic change in the content: <h1>HTML</h1> <p>HTML is a language for describing web pages…..</p><hr> <h1>CSS</h1> <p>CSS defines how to display HTML elements…..</p> Try it Yourself » Definition and Usage The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic). The <hr> […]

HTML <header> Tag

Example A header for an <article>: <article> <header> <h1>Most important heading here</h1> <h3>Less important heading here</h3> <p>Some additional information here</p> </header> <p>Lorem Ipsum dolor set amet….</p> </article> Try it Yourself » Definition and Usage The <header> element represents a container for introductory content or a set of navigational links. A <header> element typically contains: one […]

HTML <head> Tag

Example An HTML document, with a <title> tag inside the head section: <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head><body> The content of the document…… </body> </html> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <head> element is a container for all the head elements. The <head> element can […]

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 […]