Skip to content

Commit

Permalink
CSS modules: CSS table (#33236)
Browse files Browse the repository at this point in the history
* CSS modules: CSS table

* CSS modules: CSS table

* Apply suggestions from code review

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>

* trying again. will it take?

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>

* move html down

* lint

* Update files/en-us/web/css/css_table/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/css/css_table/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/css/css_table/index.md

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>

* Update files/en-us/web/css/css_table/index.md

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>

---------

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 25, 2024
1 parent 7793383 commit b319e19
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions files/en-us/web/css/border-collapse/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,4 @@ table td {

- {{cssxref("border-spacing")}}, {{cssxref("border-style")}}
- The `border-collapse` property alters the appearance of the {{htmlelement("table")}} HTML element.
- [CSS table](/en-US/docs/Web/CSS/CSS_table) module
1 change: 1 addition & 0 deletions files/en-us/web/css/border-spacing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ td {

- {{cssxref("border-collapse")}}, {{cssxref("border-style")}}
- The `border-spacing` property alters the appearance of the {{htmlelement("table")}} HTML element.
- [CSS table](/en-US/docs/Web/CSS/CSS_table) module
5 changes: 5 additions & 0 deletions files/en-us/web/css/caption-side/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,8 @@ td {
## Browser compatibility

{{Compat}}

## See also

- [CSS table](/en-US/docs/Web/CSS/CSS_table) module
- [CSS logical properties and values](/en-US/docs/Web/CSS/CSS_logical_properties_and_values) module
68 changes: 67 additions & 1 deletion files/en-us/web/css/css_table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ spec-urls: https://www.w3.org/TR/CSS22/tables.html

The **CSS table** module helps you define how to lay out table data.

This CSS module defines styles applicable to the HTML {{htmlelement("table")}} element, which is used to render tabular data. By default, tables are rendered as a two-dimensional grid with cells lined up in a series of consecutive rows and columns. This layout is generated from the table structure and sized according to the content of the cells. This module also enables defining the position of the table's {{htmlelement("caption")}}, if present.

The properties introduced in this module aren't limited to the `<table>` elements; they can be applied to any element with a table-related CSS {{cssxref("display")}} value.

## Reference

### Properties
Expand All @@ -18,8 +22,70 @@ The **CSS table** module helps you define how to lay out table data.
- {{cssxref("caption-side")}}
- {{cssxref("empty-cells")}}
- {{cssxref("table-layout")}}
- {{cssxref("vertical-align")}}

## Guides

- [Learn: CSS table layout](/en-US/docs/Learn/CSS/CSS_layout/Introduction#table_layout)

- : An overview of CSS layouts, including how to set table-related `display` values to enable using CSS table properties on any element.

- [Learn: Styling tables](/en-US/docs/Learn/CSS/Building_blocks/Styling_tables)

- : A guide to improving the appearance of HTML tables, covering table styling techniques.

- [Learn: HTML table basics](/en-US/docs/Learn/HTML/Tables/Basics)

- : An introduction to HTML tables, including the HTML for creating rows and cells, headings, making cells span multiple columns and rows, and grouping cells in a column for styling purposes.

- [Learn: HTML table advanced features and accessibility](/en-US/docs/Learn/HTML/Tables/Advanced)

- : A look at advanced HTML table features, including captions and grouping table rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.

## Related concepts

- {{cssxref("display")}} property
- {{cssxref("vertical-align")}} property
- {{cssxref("text-align")}} property

- [CSS box sizing](/en-US/docs/Web/CSS/CSS_box_sizing) module

- {{cssxref("box-sizing")}}
- {{cssxref("height")}}
- {{cssxref("max-width")}}
- {{cssxref("min-height")}}
- {{cssxref("min-width")}}
- {{cssxref("width")}}
- {{cssxref("min-content")}} keyword

- [CSS backgrounds and borders](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders) module

- {{cssxref("border")}} shorthand
- {{cssxref("border-width")}}
- {{cssxref("border-style")}}
- {{cssxref("border-color")}}

- HTML table-related elements:

- {{htmlelement("table")}}
- {{htmlelement("caption")}}
- {{htmlelement("colgroup")}}
- {{htmlelement("col")}}
- {{htmlelement("thead")}}
- {{htmlelement("tbody")}}
- {{htmlelement("tfoot")}}
- {{htmlelement("tr")}}
- {{htmlelement("th")}}
- {{htmlelement("td")}}

## Specifications

{{Specifications}}

> **Note:** The CSS 2.2 specification defines stable standards for web styling, including detailed specifications for table formatting. The [CSS Table Module Level 3](https://drafts.csswg.org/css-tables-3/) specification seeks to expand these capabilities with advanced features for table layout and rendering. However, the table module specification is still being developed and is not yet ready for implementation.
## See also

- [CSS display](/en-US/docs/Web/CSS/CSS_display) module
- [CSS grid layout](/en-US/docs/Web/CSS/CSS_grid_layout) module
- [CSS flexible box layout](/en-US/docs/Web/CSS/CSS_flexible_box_layout) module
- [CSS fragmentation](/en-US/docs/Web/CSS/CSS_fragmentation) module
1 change: 1 addition & 0 deletions files/en-us/web/css/empty-cells/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ th {

- {{cssxref("border-collapse")}}
- [Styling tables](/en-US/docs/Learn/CSS/Building_blocks/Styling_tables)
- [CSS table](/en-US/docs/Web/CSS/CSS_table) module
1 change: 1 addition & 0 deletions files/en-us/web/css/table-layout/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,4 @@ td {
## See also

- [`<table>`](/en-US/docs/Web/HTML/Element/table)
- [CSS table](/en-US/docs/Web/CSS/CSS_table) module

0 comments on commit b319e19

Please sign in to comment.