HTML table Tag

November 11th, 2010 by aBisona 
Example A simple HTML table, containing two columns and two rows: <table > <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it yourself » (more examples at the bottom of this page) Definition and Usage The <table> tag defines an HTML table. A simple HTML table...

HTML sub and sup Tags

November 11th, 2010 by aBisona 
Example Subscript and superscript text: <p>This text contains <sub>subscript</sub> text.</p> <p>This text contains <sup>superscript</sup> text.</p> Try it yourself » Definition and Usage The <sub> tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O. The...

HTML sub and sup Tags

November 11th, 2010 by aBisona 
Example Subscript and superscript text: <p>This text contains <sub>subscript</sub> text.</p> <p>This text contains <sup>superscript</sup> text.</p> Try it yourself » Definition and Usage The <sub> tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O. The...

HTML style Tag

November 11th, 2010 by aBisona 
Example Use of the style element in an HTML document: <html> <head> <style type=”text/css”> h1 {color:red} p {color:blue} </style> </head> <body> <h1>Header 1</h1> <p>A paragraph.</p> </body> </html> Try it yourself » Definition and Usage The <style> tag is used to define style information for an HTML document. Inside...

HTML span Tag

November 11th, 2010 by aBisona 
Example A text with a span element that can be styled with CSS: <p>My mother has <span class=”blue”>light blue</span> eyes.</p> Try it yourself » Definition and Usage The <span> tag provides no visual change by itself. The <span> tag provides a way to add a hook to a part of a text or a part of a document. When the text is hooked in a span...

HTML tt i b big small Tags

November 11th, 2010 by aBisona 
Example Format text in a document: <tt>Teletype text</tt> <i>Italic text</i> <b>Bold text</b> <big>Big text</big> <small>Small text</small> Try it yourself » Definition and Usage The <tt>, <i>, <b>, <big>, and <small> tags are all font-style tags. They are not deprecated, but it is possible to achieve richer...

HTML select Tag

November 11th, 2010 by aBisona 
Example Create a select list with four options: <select> <option value=”volvo”>Volvo</option> <option value=”saab”>Saab</option> <option value=”mercedes”>Mercedes</option> <option value=”audi”>Audi</option> </select> Try it yourself » Definition and Usage The <select> tag is used to...

HTML script Tag

November 11th, 2010 by aBisona 
Example Insert a JavaScript in an HTML page: <script type=”text/javascript”> document.write(“Hello World!”) </script> Try it yourself » Definition and Usage The <script> tag is used to define a client-side script, such as a JavaScript. The script element either contains scripting statements or it points to an external script file through the src attribute. The...

HTML em strong dfn code samp kbd var cite Tags

November 11th, 2010 by aBisona 
Example Format text in a document: <em>Emphasized text</em> <strong>Strong text</strong> <dfn>Definition term</dfn> <code>Computer code text</code> <samp>Sample computer code text</samp> <kbd>Keyboard text</kbd> <var>Variable</var> <cite>Citation</cite> Try it yourself » Definition and Usage The <em>,...

HTML s and strike Tags

November 11th, 2010 by aBisona 
The s and strike elements are deprecated. Example Strikethrough text can be marked up as follows: <p>Version 2.0 is <s>not yet available!</s> now available!</p> <p>Version 2.0 is <strike>not yet available!</strike> now available!</p> Try it yourself » Definition and Usage The <s> and <strike> tags defines strikethrough text.

HTML q Tag

November 11th, 2010 by aBisona 
Example A short quotation is marked up as follows: <q> Here is a short quotation here is a short quotation </q> Try it yourself » Definition and Usage The <q> tag defines a short quotation. The browser will insert quotation marks around the quotation.

HTML pre Tag

November 11th, 2010 by aBisona 
Example Preformatted text: <pre> Text in a pre element is displayed in a fixed-width font, and it preserves both      spaces and line breaks </pre> Try it yourself » Definition and Usage The <pre> tag defines preformatted text. Text in a pre element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.