Jump to content
Main menu
Main menu
move to sidebar
hide
Content
Game Mechanics
Game Mechanics Main
Player Handout
Characters
Character Advancement
Attributes and Skills
Rules
Combat and Injuries
Movement and Chases
Space Travel
Combat
Character Sheets
Links
Aliens
Aliens Main
Races
Creatures
The Force
The Force Main
Force Powers
Lightsaber Fighting Styles
Force Paths
Force Weapons
Artifacts
Lightsaber Construction
Droids
Droids Main
1st Degree Droids
2nd Degree Droids
3rd Degree Droids
4th Degree Droids
5th Degree Droids
Droid add-ons and Junk
Starships
Starships Main
Starfighters
Space Transports
Capital Ships
Space Stations
Tactical Space Weapons
Starship Modifications
Equipment
Individual Ships
Star Systems
Star Systems Main
Deep Core
Core Worlds
Colonies
Inner Rim
Expansion Region
Mid Rim
Outer Rim
Wild Space
Hutt Space
Corporate Sector
Unknown Region
Vehicles
Vehicles Main
Airships
Airspeeders
Beast Vehicles
Gliders
Ground Vehicles
Hover Vehicles
Landspeeders
Rotor Vehicles
Sail Barges
Skiffs
Speeder Bikes
Swoops
Walkers
Watercraft
Equipment
Equipment Main
Structures and Bases
Communications
Conveyances
Droid add-ons and Junk
Information
Medical
Protective Equipment
Security
Surveillance
Survival
Tools
Weapons
Weapons Main
Artillery
Blasters
Grenades & Explosives
Melee Weapons
Miscellaneous Weapons
Missile Weapons
Poisons
Ranged Weapons
Thrown Weapons
Weapons Accessories
Characters
Characters Main
Templates
Non-Player Characters
Stock Non-Player Characters
Story Lines
Story Lines Main
Conrad Deception
After the Fall
Collapsible World
Retrieval
Crossovers
Crossovers Main
Alien vs Predator
Andromeda
Babylon 5
Battlestar Galactica
Farscape
Halo
Mass Effect
Mobile Suit Gundam
Perry Rhodan
Robotech Defence Force
Serenity
Shadowrun
Space Balls
Star Control
Stargate
Starship Troopers
Star Trek
The Last Starfighter
Warhammer 40,000
Wing Commander
Home Brewed
Home Brewed Main
Aliens
Equipment
Starships
Quests
Star Systems
House Rules
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Episode D6: Star Wars D6 Wiki
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help:Tables
(section)
Help page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== XHTML attributes == You can add XHTML attributes to tables. For the authoritative source on these, see [http://www.w3.org/TR/REC-html40/struct/tables.html the W3C's HTML 4.01 Specification page on tables]. === Attributes on tables === Placing attributes after the table start tag (<code>{|</code>) applies attributes to the entire table. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre> {| border="1" align="center" style="text-align:center;" |Orange |Apple |12,333.00 |- |Bread |Pie |500.00 |- |Butter |Ice cream |1.00 |} </pre> | {| border="1" align="center" style="text-align:center;" |Orange |Apple |12,333.00 |- |Bread |Pie |500.00 |- |Butter |Ice cream |1.00 |} |} === Attributes on cells === You can put attributes on individual '''cells'''. For example, numbers may look better aligned right. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre> {| border="1" |Orange |Apple |align="right" | 12,333.00 |- |Bread |Pie |align="right" | 500.00 |- |Butter |Ice cream |align="right" | 1.00 |} </pre> | {| border="1" |Orange |Apple |align="right"|12,333.00 |- |Bread |Pie |align="right"|500.00 |- |Butter |Ice cream |align="right"|1.00 |} |} You can also use '''cell''' attributes when you are listing multiple '''cells''' on a single line. Note that the '''cells''' are separated by <code>||</code>, and within each '''cell''' the attribute(s) and value are separated by <code>|</code>. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre> {| border="1" | Orange || Apple || align="right" | 12,333.00 |- | Bread || Pie || align="right" | 500.00 |- | Butter || Ice cream || align="right" | 1.00 |} </pre> | {| border="1" | Orange || Apple || align="right" | 12,333.00 |- | Bread || Pie || align="right" | 500.00 |- | Butter || Ice cream || align="right" | 1.00 |} |} ===Attributes on rows=== You can put attributes on individual '''rows''', too. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre> {| border="1" |Orange |Apple |align="right"|12,333.00 |- |Bread |Pie |align="right"|500.00 |- style="font-style:italic; color:green;" |Butter |Ice cream |align="right"|1.00 |} </pre> | {| border="1" |Orange |Apple |align="right"|12,333.00 |- |Bread |Pie |align="right"|500.00 |- style="font-style:italic; color:green;" |Butter |Ice cream |align="right"|1.00 |} |} ====Simple one-pixel table border==== The default table formatting uses the "border-collapse: separate" model, which adds table cell spacing (which also separates the table outer border from its content cells). Even with a zero cellspacing, the borders of consecutive cells (and of the overall table container) will add up, so to get a one-pixel separation between cells, you need to selectively remove one or more of the four borders of cells. Such tables may be formatted more simply, using the "border-collapse: collapse" CSS property; in this table formatting model, the cellspacing attribute (or the CSS "border-spacing:" property) and the table's "padding:" CSS property is ignored and only the larger border of adjacent inner cells (or the table border for outer cells) will be used. An example of the above for one-pixel table border, using each model (without need for external extensions): {|border="1" cellspacing="0" cellpadding="2" |- !|You type !width="200"|You get |- | <pre style="font-size: 80%"> {|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0" |- !style="border-style: solid; border-width: 0 1px 1px 0"| Orange !style="border-style: solid; border-width: 0 0 1px 0"| Apple |- |style="border-style: solid; border-width: 0 1px 0 0"| Bread |style="border-style: solid; border-width: 0"| Pie |} </pre> | {|style="margin: 0; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000; padding: 0" |- !style="border-style: solid; border-width: 0 1px 1px 0"| Orange !style="border-style: solid; border-width: 0 0 1px 0"| Apple |- |style="border-style: solid; border-width: 0 1px 0 0"| Bread |style="border-style: solid; border-width: 0"| Pie |} |- | <pre style="font-size: 80%"> {|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000" |- !style="border-style: solid; border-width: 1px"| Orange !style="border-style: solid; border-width: 1px"| Apple |- |style="border-style: solid; border-width: 1px"| Bread |style="border-style: solid; border-width: 1px"| Pie |} </pre> | {|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000" |- !style="border-style: solid; border-width: 1px"| Orange !style="border-style: solid; border-width: 1px"| Apple |- |style="border-style: solid; border-width: 1px"| Bread |style="border-style: solid; border-width: 1px"| Pie |} |} Notes : * When using the "border-width:" CSS shortcut property, the order of the four space-separated specified values is: top, right, bottom, left. As an example from above: ::"border-width: 0 1px 0 0" :When there are fewer than 4 values, the value for left takes its default from the value for right, the value for bottom takes its default from the value for top, and the value for right takes its default from the value for top. * The HTML attributes (such as "width=", "border=", "cellspacing=", "cellpadding=") do not need any length unit (the pixel unit is assumed). The CSS style properties (which override the HTML attributes) require an explicit length unit (if the value is not 0) such as "px" for the pixel. ===HTML colspan and rowspan=== You can use HTML '''colspan''' and '''rowspan''' attributes on cells for advanced layout. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre> {| border="1" !colspan="6"|Shopping List |- |rowspan="2"|Bread & Butter |Pie |Buns |Danish |colspan="2"|Croissant |- |Cheese |colspan="2"|Ice cream |Butter |Yoghurt |} </pre> | {| border="1" !colspan="6"|Shopping List |- |rowspan="2"|Bread & Butter |Pie |Buns |Danish |colspan="2"|Croissant |- |Cheese |colspan="2"|Ice cream |Butter |Yoghurt |} |} ===With HTML attributes and CSS styles=== [[Manual:CSS|CSS]] style attributes can be added with or without other HTML attributes. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;"> {| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1" |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} </pre> | {| style="color:green; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1" |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} |} '''Attributes''' can be added to the caption and headers as follows. {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;"> {| border="1" cellpadding="20" cellspacing="0" |+ align="bottom" style="color:#e76700;" |''Food complements'' |- |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} </pre> | {| border="1" cellpadding="20" cellspacing="0" |+ align="bottom" style="color:#e76700;" |''Food complements'' |- |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} |} ===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: {| cellspacing="0" border="1" !style="width:50%"|You type !style="width:50%"|You get |- | <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word; word-break:break-all;"> {| border="1" cellspacing="0" cellpadding="2" |- !scope="col"| Item !scope="col"| Quantity !scope="col"| Price |- !scope="row"| Bread | 0.3 kg | $0.65 |- !scope="row"| Butter | 0.125 kg | $1.25 |- !scope="row" colspan="2"| Total | $1.90 |} </pre> | {| border="1" cellspacing="0" cellpadding="2" |- !scope="col"| Item !scope="col"| Quantity !scope="col"| Price |- !scope="row"| Bread | 0.3 kg | $0.65 |- !scope="row"| Butter | 0.125 kg | $1.25 |- !scope="row" colspan="2"| Total | $1.90 |} |}
Summary:
Please note that all contributions to Episode D6: Star Wars D6 Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Episode D6: Star Wars D6 Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Help:Tables
(section)
Add topic