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 <embed> src Attribute

Example An embedded flash animation: <embed src=”helloworld.swf”> Try it Yourself » Definition and Usage The src attribute specifies the address of the external file to embed. Browser Support Attribute src Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 The <embed> tag is new in HTML5. Syntax <embed src=”URL“> Attribute Values Value Description URL […]

HTML <wbr> Tag

Example A text with word break opportunities: <p> To learn AJAX, you must be familiar with the XML<wbr>Http<wbr>Request Object. </p> Try it Yourself » Definition and Usage The <wbr> (Word Break Opportunity) tag specifies where in a text it would be ok to add a line-break. Tip: When a word is too long, or you are […]

HTML <colgroup> valign Attribute

Example An HTML table with different vertical-aligned columns: <table style=”height:200px”> <colgroup valign=”top”> <colgroup valign=”bottom”> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » Definition and Usage The valign attribute specifies the vertical alignment of the content in a column group. Browser Support Attribute valign Not supported Yes Not supported Not supported Not supported The […]

HTML <colgroup> span Attribute

Example Set the background color of the first two columns using the <colgroup> span attribute: <table> <colgroup span=”2″ style=”background:red”></colgroup> <tr> <th>ISBN</th> <th>Title</th> <th>Price</th> </tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> <tr> <td>5869207</td> <td>My first CSS</td> <td>$49</td> </tr> </table> Try it Yourself » Definition and Usage The span attribute defines the number of columns a <colgroup> element […]

HTML <base> Tag

Example Specify a default URL and a default target for all links on a page: <head> <base href=”https://www.schools.com/images/” target=”_blank”> </head><body> <img src=”stickman.gif” width=”24″ height=”39″ alt=”Stickman”> <a href=”https://www.schools.com”>Schools</a> </body> Try it Yourself » Definition and Usage The <base> tag specifies the base URL/target for all relative URLs in a document. There can be at maximum one <base> element in a document, and it […]

HTML Links

Links are found in nearly all web pages. Links allow users to click their way from page to page. HTML Links – Hyperlinks HTML links are hyperlinks. You can click on a link and jump to another document. When you move the mouse over a link, the mouse arrow will turn into a little hand. […]