Term
|
Definition
Defines a comment <!--This text is a comment--> <p>This is a regular paragraph</p> | This is a regular paragraph |
|
|
|
Term
|
Definition
The <!DOCTYPE> declaration is the very first thing in your document, before the <html> tag. This tag tells the browser which HTML or XHTML specification the document uses. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
|
Term
|
Definition
The <a> tag defines an anchor. An anchor can be used in two ways: - To create a link to another document by using the href attribute
- To create a bookmark inside a document, by using the name or id attribute
Source | Output |
---|
<p>Linking to W3Schools: <a href="http://www.w3schools.com"> W3Schools</a> </p> <p> Opening W3Schools a new browser window: <a href="http://www.w3schools.com" target="_blank">W3Schools</a> </p> | Linking to W3Schools: W3Schools Opening W3Schools a new browser window: W3Schools |
|
|
|
Term
|
Definition
Indicates an abbreviated form, like "Inc.", "etc.". By marking up abbreviations you can give useful information to browsers, spell checkers, translation systems and search-engine indexers. ExampleSource | Output |
---|
<abbr title="et cetera">etc.</abbr> | etc. |
|
|
|
Term
|
Definition
The <acronym> tag defines the start of an acronym, like "NATO". By marking up acronyms you can give useful information to browsers, spell checkers, translation systems and search-engine indexers. Source | Output |
---|
<acronym title="World Wide Web">WWW</acronym> | WWW |
|
|
|
Term
|
Definition
The <address> tag defines contact information for a document or a section. Source | Output |
---|
<address> Author: of this document:<br /> <a href="mailto:donald@disneyland.com">Donald Duck</a> </address> | Author of this document: Donald Duck |
|
|
|
Term
|
Definition
Defines an embedded applet. |
|
|
Term
|
Definition
Defines a region in an image map. Source | Output |
---|
<p>Click on one of the planets:</p> <img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" />
<map id ="planetmap" name="planetmap"> <area shape ="rect" coords ="0,0,82,126" href ="sun.htm" target ="_blank" alt="Sun" /> <area shape ="circle" coords ="90,58,3" href ="mercur.htm" target ="_blank" alt="Mercury" /> <area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /> </map> | Click on one of the planets: [image] |
|
|
|
Term
|
Definition
|
|
Term
|
Definition
The base element specifies a base URL for all the links in a page. Assume that the absolute address for an image is: <img src="http://www.w3schools.com/images/smile.gif" /> |
Now we insert the <base> tag, which specifies a base URL for all of the links in a page, in the head section of a page: <head> <base href="http://www.w3schools.com/images/" /> </head> |
When inserting images on the page in the example above, we just have to specify the relative address, and the browser will look for that file using the full URL, "http://www.w3schools.com/images/smile.gif": |
|
|
Term
|
Definition
|
|
Term
|
Definition
The bdo element overrides the default text direction. Source | Output |
---|
<bdo dir="rtl">Here is some Hebrew text</bdo> | Here is some Hebrew text |
|
|
|
Term
|
Definition
<big> | Renders as bigger text |
|
|
|
Term
|
Definition
The <blockquote> tag defines the start of a long quotation. Source | Output |
---|
Here comes a long quotation: <blockquote> here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation </blockquote> | Here comes a long quotation: here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation |
|
|
|
Term
|
Definition
The body element defines the documents' body. It contains all the contents of the document (like text, images, colors, graphics, etc.). <html> <head> </head> <body> The content of the document...... </body> </html> |
|
|
Term
|
Definition
The <br> tag inserts a single line break. The <br> tag is an empty tag (means that it has no end tag - the following is wrong: <br></br>). Source | Output |
---|
This text contains<br />a line break | This text contains a line break |
|
|
|
Term
|
Definition
Defines a push button. Inside a button element you can put content, like text or images. This is the difference between this element and buttons created with the input element. Source | Output |
---|
<button>Click Me!</button> | Click Me! |
|
|
|
Term
|
Definition
This element defines a table caption. The <caption> tag must be inserted immediately after the <table> tag. You can specify only one caption per table. Usually the caption will be centered above the table. Source | Output |
---|
<table border="1"> <caption>This is a caption</caption> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> </table> | This is a captionCell 1 | Cell 2 | |
|
|
|
Term
|
Definition
Centers its enclosed text horizontally. |
|
|
Term
|
Definition
<cite>Citation</cite> - Citation |
|
|
Term
|
Definition
<code> | Defines computer code text |
<code>Computer code text</code><br /> Computer code text |
|
|
Term
|
Definition
Defines the attribute values for one or more columns in a table. You can only use this element inside a table or a colgroup. Source | Output |
---|
This example shows a colgroup that has three columns of different widths: <table border="1"> <colgroup span="3"> <col width="20"></col> <col width="50"></col> <col width="80"></col> </colgroup> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </table> | This example shows a colgroup that has three columns of different widths: |
|
|
|
Term
|
Definition
Defines groups of table columns. With this element, you can group columns for formatting. This element is only valid inside the <table> tag. Source | Output |
---|
<table border="1"> <colgroup span="3" style="color:#FF0000;"> </colgroup> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </table> | |
|
|
|
Term
|
Definition
Source | Output |
---|
<dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> | - Coffee
- Black hot drink
- Milk
- White cold drink
| The <dd> tag defines the description of a term in a definition list |
|
|
Term
|
Definition
Defines text that has been deleted in a document. Source | Output |
---|
a dozen is <del>20</del> 12 pieces | a dozen is 20 12 pieces |
|
|
|
Term
|
Definition
<dfn> | Defines a definition term |
<dfn>Definition term</dfn><br /> - Definition term |
|
|
Term
|
Definition
The <dir> tag defines a directory list. Source | Output |
---|
<dir> <li>html</li> <li>xhtml</li> </dir> | html xhtml |
|
|
|
Term
|
Definition
The <div> tag defines a division/section in a document. This is some text <div style="color:#FF0000;"> <h4>This is a header in a div section</h4> <p>This is a paragraph in a div section</p> </div> | This is some text This is a header in a div sectionThis is a paragraph in a div section |
|
|
|
Term
|
Definition
The <dl> tag defines a definition list. Source | Output |
---|
<dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> | - Coffee
- Black hot drink
- Milk
- White cold drink
|
|
|
|
Term
|
Definition
The <dt> tag defines the start of a term in a definition list. Source | Output |
---|
<dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> | - Coffee
- Black hot drink
- Milk
- White cold drink
|
|
|
|
Term
|
Definition
<em> | Renders as emphasized text |
<em>Emphasized text</em><br /> - Emphasized text |
|
|
Term
|
Definition
The fieldset element draws a box around its containing elements fieldset> Height <input type="text" size="3" /> Weight <input type="text" size="3" /> </fieldset> | Height Weight |
|
|
|
Term
|
Definition
The <font> tag specifies the font face, font size, and font color of text Source | Output |
---|
<font size="3" color="red"> This is some text! </font> <font size="1" color="blue"> This is some text! </font> <font face="arial" color="red"> This is some text! </font> | This is some text! This is some text! This is some text! |
|
|
|
Term
|
Definition
The form element creates a form for user input. A form can contain textfields, checkboxes, radio-buttons and more. Forms are used to pass user-data to a specified URL. <form action="form_action.asp" method="get">
First name: <input type="text" name="fname" value="Mickey" /> <br /> Last name: <input type="text" name="lname" value="Mouse" /> <br /> <input type="submit" value="Submit" />
</form>
<p> If you click the "Submit" button, you will send your input to a new page called form_action.asp. </p> | First name: Last name:
If you click the "Submit" button, you will send your input to a new page called form_action.asp. |
|
|
|
Term
|
Definition
Defines a sub window (a frame). Source | Output |
---|
<a href="planets.htm" target="_blank">View this page for the result</a> The source code in "planets.htm": <html> <frameset cols = "25%, 25%,*"> <frame src ="venus.htm" /> <frame src ="sun.htm" /> <frame src ="mercur.htm" /> </frameset> </html> | View this page for the result |
|
|
|
Term
|
Definition
The frameset element defines a frameset. It is used to organize multiple windows (frames). Each frame holds a separate document. In its simplest use, the frameset element states only how many columns or rows there will be in the frameset. You must use the cols or the rows attribute. Source | Output |
---|
<a href="planets.htm" target="_blank">View this page for the result</a> The source code in "planets.htm": <html> <frameset cols = "25%, 25%,*"> <frame src ="venus.htm" /> <frame src ="sun.htm" /> <frame src ="mercur.htm" /> </frameset> </html> | View this page for the result |
|
|
|
Term
|
Definition
The head element can contain information about the document. The browser does not display the "head information" to the user. The following tags can be in the head section: <base>, <link>, <meta>, <script>, <style>, and <title>. Source |
---|
<html> <head> <title>Title of the document</title> </head> <body> ... ... ... </body> </html> |
|
|
|
Term
|
Definition
The <h1> to <h6> tags define headers. <h1> defines the largest header. <h6> defines the smallest header. <h1>This is header 1</h1> <h2>This is header 2</h2> <h3>This is header 3</h3> <h4>This is header 4</h4> <h5>This is header 5</h5> <h6>This is header 6</h6> | This is header 1This is header 2This is header 3This is header 4This is header 5This is header 6 |
|
|
|
Term
|
Definition
The <hr> tag inserts a horizontal rule. Output |
---|
This is some text <hr /> This is some text | This is some text This is some text |
|
|
|
Term
|
Definition
This element tells a browser that this is an HTML document. <html xmlns="http://www.w3.org/1999/xhtml"> <head> </head> <body> ... ... ... </body> </html> |
|
|
|
Term
|
Definition
<i> | Renders as italic text |
<i>Italic text</i><br /> - Italic text |
|
|
Term
|
Definition
The iframe element creates an inline frame that contains another document. ExampleSource | Output |
---|
<iframe src ="/default.asp" width="100%"> </iframe> | |
|
|
|
Term
|
Definition
The img element defines an image. Source | Output |
---|
<img src="angry.gif" alt="Angry" /> | [image] |
|
|
|
Term
|
Definition
The <input> tag defines the start of an input field where the user can enter data. ExampleSource | Output |
---|
<form action="form_action.asp" method="get">
First name: <input type="text" name="fname" value="Mickey" /> <br /> Last name: <input type="text" name="lname" value="Mouse" /> <br /> <input type="submit" value="Submit" />
</form>
<p> If you click the "Submit" button, you will send your input to a new page called form_action.asp. </p> | First name: Last name: If you click the "Submit" button, you will send your input to a new page called form_action.asp. |
|
|
|
Term
|
Definition
Defines inserted text. Source | Output |
---|
a dozen is <del>20</del> <ins>12</ins> pieces! | a dozen is 20 12 pieces! |
|
|
|
Term
|
Definition
<kbd> | Defines keyboard text |
<kbd>Keyboard text</kbd><br /> - Keyboard text |
|
|
Term
|
Definition
Defines a label to a control. If you click the text within the label element, it is supposed to toggle the control. Source | Output |
---|
<p>Try clicking on the text labels:</p> <form name="input" action=""> <input type="radio" name="sex" id="male" /> <label for="male">Male</label> <br /> <input type="radio" name="sex" id="female" /> <label for="female">Female</label> </form> | Try clicking on the text labels: Male Female |
|
|
|
Term
|
Definition
The legend element defines a caption for a fieldset. Source | Output |
---|
<fieldset> <legend>Health information:</legend> Height <input type="text" size="3" /> Weight <input type="text" size="3" /> </fieldset> | Health information:Height Weight |
|
|
|
Term
|
Definition
The <li> tag defines the start of a list item. The <li> tag is used in both ordered (<ol>) and unordered lists (<ul>). Source | Output |
---|
<ol> <li>Coffee</li> <li>Tea</li> </ol> <ul> <li>Coffee</li> <li>Tea</li> </ul> | - Coffee
- Tea
|
|
|
|
Term
|
Definition
This element defines the relationship between two linked documents. How to use the <link> tag to link to an external style sheet: <head> <link rel="stylesheet" type="text/css" href="theme.css" /> </head> |
|
|
Term
|
Definition
Defines a client-side image-map. An image-map is an image with clickable regions. <p>Click on one of the planets:</p>
<img src ="planets.gif" width ="145" height ="126" alt="Planets" usemap ="#planetmap" />
<map id ="planetmap" name="planetmap"> <area shape ="rect" coords ="0,0,82,126" href ="sun.htm" target ="_blank" alt="Sun" /> <area shape ="circle" coords ="90,58,3" href ="mercur.htm" target ="_blank" alt="Mercury" /> <area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /> </map> | Click on one of the planets: [image] |
|
|
|
Term
|
Definition
The <menu> tag defines a menu list ExampleSource | Output |
---|
<menu> <li>html</li> <li>xhtml</li> </menu> | html xhtml |
|
|
|
Term
|
Definition
The <meta> element provides meta-information about your page, such as descriptions and keywords for search engines and refresh rates. Define keywords for search engines: <meta name="keywords" content="HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript" /> |
Define a description of your web page: <meta name="description" content="Free Web tutorials on HTML, CSS, XML, and XHTML" /> |
Define the last revision of your page: <meta name="revised" content="Hege Refsnes, 6/10/99" /> |
Refresh page every 5 seconds: <meta http-equiv="refresh" content="5" /> |
|
|
|
Term
|
Definition
The noframes element displays text for browsers that do not handle frames. The noframes element goes inside the frameset element. <frameset cols = "25%, 25%,*"> <noframes> <body>Your browser does not handle frames!</body> </noframes> <frame src ="venus.htm" /> <frame src ="sun.htm" /> <frame src ="mercur.htm" /> </frameset> |
|
|
Term
|
Definition
The noscript element is used to define an alternate content (text) if a script is NOT executed. This tag is used for browsers that recognizes the <script> tag, but does not support the script in it. JavaScript: <body> ... ... <script type="text/javascript"> <!-- document.write("Hello World!") //--> </script> <noscript>Your browser does not support JavaScript!</noscript> ... ... </body> VBScript: <body> ... ... <script type="text/vbscript"> <!-- document.write("Hello World!") '--> </script> <noscript>Your browser does not support VBScript!</noscript> ... ... </body> |
|
|
Term
|
Definition
Defines an embedded object. Use this element to add multimedia to your XHTML page. This element allows you to specify the data and parameters for objects inserted into HTML documents, and the code that can be used to display/manipulate that data. ExampleSource | Output |
---|
<object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id="Slider1" width="100" height="50"> <param name="BorderStyle" value="1" /> <param name="MousePointer" value="0" /> <param name="Enabled" value="1" /> <param name="Min" value="0" /> <param name="Max" value="10" /> </object> | |
|
|
Term
|
Definition
The <ol> tag defines the start of an ordered list. Source | Output |
---|
<ol> <li>Coffee</li> <li>Tea</li> </ol> | - Coffee
- Tea
|
|
|
|
Term
|
Definition
Defines an option group. This element allows you to group choices. When you have a long list of options, groups of related choices are easier to handle. Source | Output |
---|
<select> <optgroup label="Swedish Cars"> <option value ="volvo">Volvo</option> <option value ="saab">Saab</option> </optgroup> <optgroup label="German Cars"> <option value ="mercedes">Mercedes</option> <option value ="audi">Audi</option> </optgroup> </select> | Volvo Saab Mercedes Audi |
|
|
|
Term
|
Definition
The option element defines an option in the drop-down list. Source | Output |
---|
<select> <option value ="volvo">Volvo</option> <option value ="saab">Saab</option> <option value ="opel" selected="selected">Opel</option> <option value ="audi">Audi</option> </select> | Volvo Saab Opel Audi |
|
|
|
Term
|
Definition
The <p> tag defines a paragraph. Source | Output |
---|
<p>This is some text in a very short paragraph</p> | This is some text in a very short paragraph |
|
|
|
Term
|
Definition
The param element allows you to specify the run-time settings for an object inserted into XHTML documents. Source | Output |
---|
<object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id="Slider1" width="100" height="50"> <param name="BorderStyle" value="1" /> <param name="MousePointer" value="0" /> <param name="Enabled" value="1" /> <param name="Min" value="0" /> <param name="Max" value="10" /> </object> | |
|
|
|
Term
|
Definition
The pre element defines preformatted text. The text enclosed in the pre element usually preserves spaces and line breaks. The text renders in a fixed-pitch font. Source | Output |
---|
<pre> This text is in a fixed-pitch font, and it preserves both spaces and line breaks </pre> | This text is in a fixed-pitch font, and it preserves both spaces and line breaks |
|
|
|
Term
|
Definition
The <q> tag defines the start of a short quotation. Source | Output |
---|
Here comes a short quotation: <q>here is a short quotation here is a short quotation</q> | Here comes a short quotation: here is a short quotation here is a short quotation |
|
|
|
Term
|
Definition
The <s> and <strike> tags defines strikethrough text. Source | Output |
---|
A new version is <s>not yet available.</s> now available! <br /> <br /> A new version is <strike>not yet available.</strike> now available! | A new version is not yet available. now available!
A new version is not yet available. now available! |
|
|
|
Term
|
Definition
<samp> | Defines sample computer code |
<samp>Sample computer code - Sample computer code text |
|
|
Term
|
Definition
Defines a script, such as a JavaScript. Source | Output |
---|
<script type="text/javascript"> document.write("Hello World!") </script> | Hello World! |
|
|
|
Term
|
Definition
The select element creates a drop-down list. Source | Output |
---|
<select> <option value ="volvo">Volvo</option> <option value ="saab">Saab</option> <option value ="opel">Opel</option> <option value ="audi">Audi</option> </select> | Volvo Saab Opel Audi |
|
|
|
Term
|
Definition
<small> | Renders as smaller text |
<small>Small text</small><br /> - Small text |
|
|
Term
|
Definition
The <span> tag is used to group inline-elements in a document. Source | Output |
---|
<p>This is a paragraph <span style="color:#0000FF;">This is a paragraph</span> This is a paragraph</p> <p> <span style="color:#00DD45;"> This is another paragraph </span> </p> | This is a paragraph This is a paragraph This is a paragraph This is another paragraph |
|
|
|
Term
|
Definition
<strong> | Renders as strong emphasized text |
<strong>Strong text</strong><br /> - Strong text |
|
|
Term
|
Definition
Defines a style in a document. The style element goes in the head section. If you want to include a style sheet in your page, you should define the style sheet externally, and link to it using <link>. Source |
---|
<head> <style type="text/css"> h1 {color: red} h3 {color: blue} </style> </head> |
|
|
|
Term
|
Definition
The <sub> tag defines subscript text. The <sup> tag defines superscript text. This text contains <sub>subscript</sub>
This text contains <sup>superscript</sup> | This text contains subscript
This text contains superscript |
|
|
|
Term
|
Definition
The <table> tag defines a table. Inside a <table> tag you can put table headers, table rows, table cells, and other tables. Source | Output |
---|
<table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> | |
|
|
|
Term
|
Definition
Defines a table body. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data. Source | Output |
---|
<table border = "1"> <thead> <tr> <td>This text is in the THEAD</td> </tr> </thead> <tfoot> <tr> <td>This text is in the TFOOT</td> </tr> </tfoot> <tbody> <tr> <td> This text is in the TBODY</td> </tr> </tbody> </table> | This text is in the THEAD | This text is in the TFOOT | This text is in the TBODY |
|
|
|
|
Term
|
Definition
Source | Output |
---|
<table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> | |
|
|
|
Term
|
Definition
Defines a text-area (a multi-line text input control). A user can write text in the text-area. In a text-area you can write an unlimited number of characters. The default font in the text-area is fixed pitch. Source | Output |
---|
<textarea rows="2" cols="20"> The cat was playing in the garden. Suddenly a dog showed up..... </textarea> | The cat was playing in the garden. Suddenly a dog showed up..... |
|
|
|
Term
|
Definition
Defines a table footer. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data. ExamplesSource | Output |
---|
<table border = "1"> <thead> <tr> <td>This text is in the THEAD</td> </tr> </thead> <tfoot> <tr> <td>This text is in the TFOOT</td> </tr> </tfoot> <tbody> <tr> <td>This text is in the TBODY</td> </tr> </tbody> </table> | This text is in the THEAD | This text is in the TFOOT | This text is in the TBODY |
|
|
|
|
Term
|
Definition
Defines a table header cell in a table. The text within the th element usually renders in bold. Source | Output |
---|
<table border = "1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> | Header 1 | Header 2 |
---|
Cell A | Cell B |
|
|
|
|
Term
|
Definition
Defines a table header. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data. Source | Output |
---|
<table border = "1"> <thead> <tr> <td>This text is in the THEAD</td> </tr> </thead> <tfoot> <tr> <td>This text is in the TFOOT</td> </tr> </tfoot> <tbody> <tr> <td>This text is in the TBODY</td> </tr> </tbody> </table> | This text is in the THEAD | This text is in the TFOOT | This text is in the TBODY |
|
|
|
|
Term
|
Definition
This element defines the title of the document. Example<html> <head> <title>XHTML Tag Reference</title> </head> <body> The content of the document...... </body> </html> |
|
|
|
Term
|
Definition
Source | Output |
---|
<table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> | |
|
|
|
Term
|
Definition
<tt>Teletype text</tt><br /> - Teletype text |
|
|
Term
|
Definition
The <u> tag defines underlined text. Source | Output |
---|
A new version is <u>now available!</u> | A new version is now available! |
|
|
|
Term
|
Definition
<var>Variable</var><br /> - Variable |
|
|
Term
|
Definition
The <ul> tag defines an unordered list. Source | Output |
---|
<ul> <li>Coffee</li> <li>Tea</li> </ul> | |
|
|
|