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

HTML <main> Tag

Example <main> <h1>Web Browsers</h1> <p>Google Chrome, Firefox, and Internet Explorer are the most used browsers today.</p><article> <h1>Google Chrome</h1> <p>Google Chrome is a free, open-source web browser developed by Google, released in 2008.</p> </article><article> <h1>Internet Explorer</h1> <p>Internet Explorer is a free web browser from Microsoft, released in 1995.</p> </article> <article> <h1>Mozilla Firefox</h1> <p>Firefox is a free, […]

HTML <link> Attribute

HTML <link> charset Attribute Example The charset attribute indicates that the linked document is written in Japanese: <link href=”domoarigato.htm” rel=”parent” charset=”ISO-2022-JP”> Definition and Usage The <link> charset attribute is not supported in HTML5. The charset attribute specifies the character encoding of the linked document. The default character-set for modern browsers is ISO-8859-1. Syntax <link charset=”character_set”> Attribute Values Value Description character_set […]

HTML <menu> Tag

  Note: This content has been removed from HTML5 family      

HTML <input> Type Attribute Values

HTML <input type=”button”> Example A push button that activates a JavaScript when it is clicked: <input type=”button” value=”Click me” onclick=”msg()”> Try it Yourself HTML <input type=”checkbox”> Example Let the user select one or more options of a limited number of choices: <input type=”checkbox” name=”vehicle1″ value=”Bike”> I have a bike<br> <input type=”checkbox” name=”vehicle2″ value=”Car”> I have a car<br> <input type=”checkbox” name=”vehicle3″ value=”Boat” checked> I have a boat<br> Try it Yourself » HTML <input type=”color”> Example […]

HTML <input> type Attribute

Example An HTML form with two different input types; text and submit: <form action=”/action_page.php”> Username: <input type=”text” name=”usrname”><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The type attribute specifies the type of <input> element to display. The default type is text. Tip: The type attribute is not a required attribute, but we […]

HTML <input> step Attribute

Example An HTML form with an input field with a specified legal number intervals: <form action=”/action_page.php”> <input type=”number” name=”points” step=”3″> <input type=”submit”> </form> Try it Yourself » Definition and Usage The step attribute specifies the legal number intervals for an <input> element. Example: if step=”3″, legal numbers could be -3, 0, 3, 6, etc. Tip: The step attribute can be used […]

HTML <input> src Attribute

Example An HTML form with an image that represents the submit button: <form action=”/action_page.php”> First name: <input type=”text” name=”fname”><br> <input type=”image” src=”submit.gif” alt=”Submit”> </form> Try it Yourself » Definition and Usage The src attribute specifies the URL of the image to use as a submit button. Note: The src attribute is required for <input type=”image”>, and can only be used with <input type=”image”>. […]

HTML <input> size Attribute

Example An HTML form with two input fields with a width of 35 and 4 characters: <form action=”/action_page.php”> Email: <input type=”text” name=”email” size=”35″><br> PIN: <input type=”text” name=”pin” maxlength=”4″ size=”4″><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » Definition and Usage The size attribute specifies the visible width, in characters, of an <input> element. Note: The size attribute works with the following input types: text, search, tel, url, email, […]