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 DOM Head Object

Head Object The Head object represents an HTML <head> element. Access a Head Object You can access a <head> element by using getElementsByTagName(): var x = document.getElementsByTagName(“HEAD”)[0]; Create a Head Object You can create a <head> element by using the document.createElement() method: var x = document.createElement(“HEAD”); Standard Properties and Events The Anchor object also supports the standard properties and events.