Jump to content

Talk:Table (HTML)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tarikash (talk | contribs) at 04:27, 30 June 2006 (pointing out the html decimal codes for better understanding). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

What to include in this page/article ?

This article is to contain/display info on the HTML/CSS/XHTML table. As info on wiki table can be found in Help:Table, this page will contain info on html table mostly, equivalent wiki table code can be placed too. But please focus on real / actual HTML/CSS/XHTML table. Thanks. ~ Tarikash.

How to display HTML Table Codes ?

HTML code displayed at the left side generates the right side table:

<tt>
<table border="5" cellspacing="5" cellpadding="2">
 <tr> <td> <img src="gnome-system.png" /> </td> </tr>
 <tr> <td> Computer </td> </tr>
 <tr> <td> Processor Speed: 2.5 GHz </td> </tr>
</table>
</tt>

Computer
Processor Speed: 2.5 GHz

Note: <tt>...</tt> HTML tags were used with the codes to display the codes with fixed width text/font, for easy reading.

To display the above, left side code, on a web page, use (or enter) below codes in the edit box when you're editing web page, by replacing the < (less than sign) with &#60; (HTML decimal code) or, replacing it with &lt; (HTML entity code) and replace only those / (forward slash) which are before the > (greater than) symbol with &#47;. For more on HTML decimal, hexadecimal codes, please see Windows Alt codes. HTML tag <br /> is used, to display (or bring) next codes, starting from the next line.

<tt>
&#60;table border="5" cellspacing="5" cellpadding="2"> <br />
&nbsp;&#60;tr> &#60;td> &#60;img src="gnome-system.png" &#47;> &#60;/td> &#60;/tr> <br />
&nbsp;&#60;tr> &#60;td> Computer &#60;/td> &#60;/tr> <br />
&nbsp;&#60;tr> &#60;td> Processor Speed: 2.5 GHz &#60;/td> &#60;/tr> <br />
&#60;/table>
</tt>

Above codes are using &nbsp; HTML entity codes to display space characters. If you want to start a line after one or more spaces, then use &nbsp; (or, &#160;) by replacing each space character.


How to display Wiki Table markup Codes ?

Wiki table markup code displayed at the left side generates the right side table:

<tt>
{| border="5" cellspacing="5" cellpadding="2"
| [[Image:gnome-system.png]]
|-
| Computer
|-
| Processor Speed: 1.8 GHz
|}
</tt>

Computer
Processor Speed: 1.8 GHz

Note: <tt>...</tt> HTML tags were used with the codes to display the codes with fixed width text/font, for easy reading.

To display the above, left side code, on a web page, use (or enter) below codes in the edit box when you're editing web page, by replacing each | (pipe symbol) with &#124; (HTML decimal code), replace { (beginning curly/second bracket) with &#123; and replace } (closing curly/second bracket) with &#125;. For more on HTML decimal, hexadecimal codes, please see Windows Alt codes. To display the wiki image markup code, replace [ (beginning third bracket) with &#91; and replace ] (closing third bracket) with &#93;. HTML tag <br /> is used, to display (or bring) next codes, starting from the next line.

<tt>
&#123;&#124; border="5" cellspacing="5" cellpadding="2" <br />
&#124; &#91;&#91;Image:gnome-system.png&#93;&#93; <br />
&#124;- <br />
&#124; Computer <br />
&#124;- <br />
&#124; Processor Speed: 1.8 GHz <br />
&#124;&#125;
</tt>