HTML DOM Bold Object

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

HTML <rp> Tag

Example A ruby annotation:www. <ruby> 漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt> </ruby> Try it Yourself » Definition and Usage The <rp> tag can be used to provide parentheses around a ruby text, to be shown by browsers that do not support ruby annotations. Use the <rp> tag together with the <ruby> and the <rt> tags: The <ruby> element consists of one or more characters […]

HTML <ruby> Tag

Example A ruby annotation: <ruby> 漢 <rt> ㄏㄢˋ </rt> </ruby> Try it Yourself » Definition and Usage The <ruby> tag specifies a ruby annotation. A ruby annotation is a small extra text, attached to the main text to indicate the pronunciation or meaning of the corresponding characters. This kind of annotation is often used in Japanese publications. Use […]

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 <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 <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 <noscript> Tag

Example Use of the <noscript> tag: <script> document.write(“Hello World!”) </script> <noscript>Your browser does not support JavaScript!</noscript> Try it Yourself » Definition and Usage The <noscript> tag defines an alternate content for users that have disabled scripts in their browser or have a browser that doesn’t support script. The <noscript> element can be used in both […]

HTML <figure> Tag

Example Use a <figure> element to mark up a photo in a document: <figure> <img src=”img_pulpit.jpg” alt=”The Pulpit Rock” width=”304″ height=”228″> </figure> Try it Yourself » Definition and Usage The <figure> tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. While the content of the <figure> element is related to the main flow, its position is independent […]

HTML <th> bgcolor Attribute

Example Add a background color to header cells: <table> <tr> <th bgcolor=”#FF0000″>Month</th> <th bgcolor=”#00FF00″>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » Definition and Usage The bgcolor attribute specifies the background color of a header cell. Browser Support Attribute bgcolor Yes Yes Yes Yes Yes Compatibility Notes The bgcolor attribute of <th> is not supported […]

HTML <th> abbr Attribute

Example Use of the abbr attribute in an HTML table: <table> <tr> <th abbr=”Make”>Toy manufacturer</th> <th abbr=”Model”>Vehicle model</th> </tr> <tr> <td>Bruder Toys</td> <td>Cross Country Vehicle</td> </tr> <tr> <td>Bruder Toys</td> <td>DHL Lorry</td> </tr> </table> Try it Yourself » Definition and Usage The abbr attribute specifies a shorter version of the content in a header cell. Browser Support Attribute […]

HTML <thead> valign Attribute

Example Vertical align the content inside the <thead> element to the bottom: <table> <thead valign=”bottom”> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> Try it Yourself » Definition and Usage The <thead> valign attribute is not supported in HTML5. Use CSS instead. The valign attribute specifies the vertical alignment of […]

HTML <thead> charoff Attribute

Example Align the content inside the <thead> two characters to the right from the “M” character: <table> <thead align=”char” char=”M” charoff=”2″> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table> Try it Yourself » Definition and Usage The <thead> charoff attribute is not supported in HTML5. The charoff attribute sets the number of […]

HTML <li> Tag

Example One ordered (<ol>) and one unordered (<ul>) HTML list: <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol><ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <li> tag defines a list item. The <li> tag is used in ordered lists(<ol>), unordered lists (<ul>), and in menu lists (<menu>). […]

HTML <a> rel Attribute

Example A link with a rel attribute: <a rel=”nofollow” href=”https://dwfaisalabad.com/”>DW Fsd</a> Try it Yourself » Definition and Usage The rel attribute specifies the relationship between the current document and the linked document. Only used if the href attribute is present. Differences Between HTML 4.01 and HTML5 Some values are removed, and some new values are added. Syntax […]