[html] table의 column width가 자동으로 결정되는 규칙

html로 table을 만들고 column의 width를 특정하지 않으면 아래의 규칙에 따라 자동으로 설정된다.

Column widths are determined as follows:
1. Calculate the minimum content width (MCW) of each cell: the formatted content may span any number of lines but may not overflow the cell box. If the specified ‘width’ (W) of the cell is greater than MCW, W is the minimum cell width. A value of ‘auto’ means that MCW is the minimum cell width.
Also, calculate the “maximum” cell width of each cell: formatting the content without breaking lines other than where explicit line breaks occur.
2. For each column, determine a maximum and minimum column width from the cells that span only that column. The minimum is that required by the cell with the largest minimum cell width (or the column ‘width’, whichever is larger). The maximum is that required by the cell with the largest maximum cell width (or the column ‘width’, whichever is larger).
3. For each cell that spans more than one column, increase the minimum widths of the columns it spans so that together, they are at least as wide as the cell. Do the same for the maximum widths. If possible, widen all spanned columns by approximately the same amount.
For each column group element with a ‘width’ other than ‘auto’, increase the minimum widths of the columns it spans, so that together they are at least as wide as the column group’s ‘width’.
Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification

셀에 출력된 문자열의 길이를 자동으로 계산한다는 말이다.