Help:Table

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(+Cat)
(Sectioning)
Line 1: Line 1:
-
'''Here's how to create a table:'''
+
'''Here's how to create a table:'''__NOTOC__
-
1. To create a table, you will first need to understand what the symbols mean:
+
==Code==
 +
To create a table, you will first need to understand what the symbols mean:
*'''<nowiki>{|</nowiki>''' - Signifies the start of a table.
*'''<nowiki>{|</nowiki>''' - Signifies the start of a table.
Line 12: Line 13:
*'''<nowiki>!!</nowiki>''' - Signifies the switch to a new header cell within a row.
*'''<nowiki>!!</nowiki>''' - Signifies the switch to a new header cell within a row.
-
2. Here is how you would use these symbols appropriatly:
+
==Usage==
 +
Here is how you would use these symbols appropriatly:
<pre>
<pre>
Line 30: Line 32:
</pre>
</pre>
-
3. To modify a specific cell, a row, or the entire table, you would use the ''style'' attribute:
+
==Styling==
 +
To modify a specific cell, a row, or the entire table, you would use the ''style'' attribute:
Placing the style attribute after the '''{|''' symbol alters the entire table:
Placing the style attribute after the '''{|''' symbol alters the entire table:
Line 49: Line 52:
</pre>
</pre>
Please note that styling a single cell has the most precedence. This means that if you style the table's background red, and style a single cell black, the single cell will appear black, rather than red.
Please note that styling a single cell has the most precedence. This means that if you style the table's background red, and style a single cell black, the single cell will appear black, rather than red.
-
 
-
__NOTOC____NOEDITSECTION__
 
[[Category:Help|T]]
[[Category:Help|T]]

Revision as of 01:36, 7 December 2005

Here's how to create a table:

Code

To create a table, you will first need to understand what the symbols mean:

  • {| - Signifies the start of a table.
  • |} - Signifies the end of a table.
  • |+ - Signifies the caption of a table; what text will appear above it, labeling it.
  • |- - Signifies the start of a table row.
  • | - Signifies the start of a regular table cell.
  • ! - Signifies the start of a header table cell. The text within a header cell is boldfaced.
  • || - Signifies the switch to a new cell within a row.
  • !! - Signifies the switch to a new header cell within a row.

Usage

Here is how you would use these symbols appropriatly:

{|

|+ This is the caption for my table.

|-

! These !! are !! my !! table !! headers

|-

| These || are || my || regular || cells

|}

Styling

To modify a specific cell, a row, or the entire table, you would use the style attribute:

Placing the style attribute after the {| symbol alters the entire table:

{| style="font-family: (a font family);border: (a thickness)"

Placing the style attribute after the |+ symbol alters the table's caption. Use the pipe symbol to divide it from the text:

|+ style="font-family: (a font family);color: (# a color)" | This is the caption for my table.

Placing the style attribute after the |- symbol alters the entire row that follows it:

|- style="font-family: (a font family);color: (# a color)"

Placing the style attribute after the | symbol alters a single cell. Use the pipe symbol to divide it from the text:

| style="font-family: (a font family);color: (# a color)" | These || are || my || regular || cells

Please note that styling a single cell has the most precedence. This means that if you style the table's background red, and style a single cell black, the single cell will appear black, rather than red.

Personal tools