Search results
Results from the WOW.Com Content Network
In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. This is because the site-wide CSS is more carefully tested to ensure compatibility with a wide range of browsers; it also creates a greater degree of professionalism by ensuring a consistent appearance between articles.
For table markup, it can be applied to whole tables, table captions, table rows, and individual cells. CSS specificity in relation to content should be considered since applying it to a row could affect all that row's cells and applying it to a table could affect all the table's cells and caption, where styles closer to the content can override ...
Note: Wikipedia:HTML 5#Table attributes. CSS to replace obsolete attributes for borders, padding, spacing, etc. Add a border around a table using the CSS property border: thickness style color;, for example border:3px dashed red. This example uses a solid (non-dashed) gray border that is one pixel wide:
The wikitable class applies specific CSS styles to tables. Rules for class ... Mobile [c] Table margin: 1em 0 background-color: #f9f9f9: white: transparent border ...
Use a non-breaking space with or {} in empty cells to maintain the table structure. Custom CSS styling: Override the wikitable class defaults by explicitly specifying: border-collapse: collapse; border: none; Apply these styles to the table or specific cells using inline styles or a custom class.
Tables will show the "[hide]" / "[show]" controls in the first row of the table (whether or not it is a header row), unless a table caption is present.(see § Tables with captions) Example with a header row
A CSS width setting for the overall table in desktop view acts like width settings on divs and tables on webpages outside Wikipedia. A horizontal scrollbar is created when the screen is too narrow for the width setting. See width outside Wikipedia: width - CSS: Cascading Style Sheets | MDN; CSS width Property.
All data tables need a table caption that succinctly describes what the table is about. [WCAG 2] It plays the role of a table heading, and is recommended as a best practice. [2] You would usually need some kind of heading or description introducing a new table anyway, and this is what the caption feature exists for. Table captions are made with |+.