User:Dontha suman/Sandbox

Suman Dontha's Sand Box
About SD Sandbox is new created for all.

Table format
Tables may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. XHTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to XHTML table elements.

Table Syntax

Table markup summary

 * The above marks must start on a new line except the double  and   for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
 * XHTML attributes. Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
 * Cells and caption ( or ,   or  , and  ) hold content. So separate any attributes from content with a single pipe . Cell content may follow on same line or on following lines.
 * Table and row marks ( and  ) do not directly hold content. Do not add pipe  after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it and your final attribute if it was touching the erroneous pipe!
 * Content may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
 * Escaping to insert a pipe character into a table use the &lt;nowiki&gt; markup

Table headers
Table headers can be created by using "!" (exclamation mark) instead of "|" (pipe symbol). Headers usually show up bold and centered by default.

Table headers syntax

Attributes on cells
You can put attributes on individual cells. For example, numbers may look better aligned right.

You can also use cell attributes when you are listing multiple cells on a single line. Note that the cells are separated by ||, and within each cell the attribute(s) and value are separated by |.

Attributes on rows
You can put attributes on individual rows, too.

HTML colspan and rowspan
You can use HTML colspan and rowspan attributes on cells for advanced layout.

With HTML attributes and CSS styles
CSS style attributes can be added with or without other HTML attributes.

Attributes can be added to the caption and headers as follows.

Accessibility of table header cells
Table header cells do not explicitly specify which table data cells they apply to (those on their right on the same row, or those below them on the same column). When the table is rendered in a visual 2D environment, this is usually easy to infer.

However when tables are rendered on non-visual medias, you can help the browser to determine which table header cell applies to the description of any selected cell (in order to repeat its content in some accessibility helper) using a scope="row" or scope="col" attribute on table header cells. In most cases with simple tables, you'll use scope="col" on all header cells of the first row, and scope="row" on the first cell of the following rows: