HTML DOM OptionGroup Object

OptionGroup Object The OptionGroup object represents an HTML <optgroup> element. Access an OptionGroup Object You can access an <optgroup> element by using getElementById(): Example var x = document.getElementById(“myOptgroup”); Try it Yourself » Create an OptionGroup Object You can create an <optgroup> element by using the document.createElement() method: Example var x = document.createElement(“OPTGROUP”); Try it Yourself » OptionGroup […]

HTML DOM Ol Object

Ol Object The Ol object represents an HTML <ol> element. Access an Ol Object You can access an <ol> element by using getElementById(): Example var x = document.getElementById(“myOl”); Try it Yourself » Create an Ol Object You can create an <ol> element by using the document.createElement() method: Example var x = document.createElement(“OL”); Try it Yourself » Ol […]

HTML <ol> Attributes

HTML <ol> compact Attribute Use of the compact attribute in an ordered HTML list: <ol compact> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> Try it Yourself » Definition and Usage The compact attribute is a boolean attribute. When present, it specifies that the list should render smaller than normal, by reducing the space between lines and the indentation of the list. […]

HTML DOM Object Object

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

HTML Plug-ins

The purpose of a plug-in is to extend the functionality of a web browser. HTML Helpers (Plug-ins) Helper applications (plug-ins) are computer programs that extend the standard functionality of a web browser. Examples of well-known plug-ins are Java applets. Plug-ins can be added to web pages with the <object> tag or the <embed> tag. Plug-ins can be used for […]

HTML <object> Attributes

HTML <object> align Attribute A right-aligned <object>: <object width=”200″ height=”200″ data=”helloworld.swf” align=”right”></object> Try it Yourself » Definition and Usage The align attribute specifies the alignment of an <object> element according to the surrounding element. The <object> 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. […]

HTML <noframes> Tag

Not Supported in HTML5 Example A three-framed page, with a <noframes> tag: <html> <frameset cols=”25%,50%,25%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> <frame src=”frame_c.htm”> <noframes>Sorry, your browser does not handle frames!</noframes> </frameset> </html> Try it Yourself » Definition and Usage The <noframes> tag is not supported in HTML5. The <noframes> tag is a fallback tag for browsers that do not support frames. […]

HTML DOM Nav Object

Nav Object  The Nav Object is new in HTML5. The Nav object represents an HTML <nav> element. Note: The <nav> element is not supported in Internet Explorer 8 and earlier versions. Access a Nav Object You can access a <nav> element by using getElementById(): Example var x = document.getElementById(“myNav”); Try it Yourself » Create a Nav Object […]

HTML <nav> Tag

Example A set of navigation links: <nav> <a href=”link-tag.html”>HTML</a> | <a href=”link-tag.html”>CSS</a> | <a href=”link-tag.html”>JavaScript</a> | <a href=”link-tag.html”>jQuery</a> </nav> Try it Yourself » Definition and Usage The <nav> tag defines a set of navigation links. Notice that NOT all links of a document should be inside a <nav> element. The <nav> element is intended only […]

HTML <tbody> Attributres

HTML <tbody> align Attribute Right-align the content inside the <tbody> element: <table> <thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tbody align=”right”> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </tbody> </table> Try it Yourself » Definition and Usage The align attribute specifies the horizontal alignment of the content inside the <tbody> element. HTML <tbody> char Attribute Align the content inside the […]

HTML <td> Attribute

Attribute Value Description abbr text Not supported in HTML5. Specifies an abbreviated version of the content in a cell align left right center justify char Not supported in HTML5. Aligns the content in a cell axis category_name Not supported in HTML5. Categorizes cells bgcolor rgb(x,x,x) #xxxxxx colorname Not supported in HTML5. Specifies the background color […]

HTML <textarea> Attributes

HTML <textarea> autofocus Attribute A text area with autofocus: <textarea autofocus> At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies. </textarea> Try it Yourself » Definition and Usage The autofocus attribute is a boolean attribute. When present, it specifies that the text area should automatically get focus when […]

HTML DOM Textarea Object

Textarea Object The Textarea object represents an HTML <textarea> element. Access a Textarea Object You can access a <textarea> element by using getElementById(): Example var x = document.getElementById(“myTextarea”); Try it Yourself » Tip: You can also access a <textarea> element by searching through the elements collection of a form. Create a Textarea Object You can create a <textarea> element […]

HTML <meter> Tag

Example Use the meter element to measure data within a given range (a gauge): <meter value=”2″ min=”0″ max=”10″>2 out of 10</meter><br> <meter value=”0.6″>60%</meter> Try it Yourself » Definition and Usage The <meter> tag defines a scalar measurement within a known range, or a fractional value. This is also known as a gauge. Examples: Disk usage, the relevance of a […]

HTML <meter> Attributes

HTML <meter> form Attribute Example A <meter> element located outside a form (but still a part of the form): <form action=”/action_page.php” method=”get” id=”form1″> First name: <input type=”text” name=”fname”><br> <input type=”submit” value=”Submit”> </form><meter form=”form1″ name=”x1″ min=”0″ low=”40″ high=”90″ max=”100″ value=”95″></meter> Try it Yourself » Definition and Usage The form attribute specifies one or more forms the <meter> element belongs to. HTML <meter> high Attribute Example A gauge with a current value and min, max, high, […]

HTML <meta> Attributes

HTML <meta> charset Attribute Example Specify the character encoding for the HTML document: <head> <meta charset=”UTF-8″> </head> Try it Yourself » Definition and Usage The charset attribute specifies the character encoding for the HTML document. Tip: The charset attribute can be locally overridden using the lang attribute on any element. HTML <meta> content Attribute Example Describe metadata within an HTML document: […]