Tag COLGROUP

Description
Tag <COLGROUP> is aimed for defining the width and style of one or several columns of the table. This tag allows reducing the table code by shortening of the repeating elements. Tag <COLGROUP> can be used with the tag <COL>, which defines the characteristics of the one or several columns.
Closing tag is not optional usually, but in case the <COLGROUP> is used as a package for elements <COL>, you should add tag </COLGROUP> in the end of the group.
The difference between characteristics of tags <COLGROUP> and <COL> is not very big. <COLGROUP> allows combining columns in certain groups. Moreover browser will draw a line only between columns, which are created with the help of <COLGROUP>.
<table>
<colgroup>
</colgroup>
<tbody>
<tr>
<td>...</td>
</tr>
</tbody>
</table>
Parameters
Aligndefines the edge alignment of the content of the column.
Spannumber of columns the parameters should be used to.
Valigndefines the vertical alignment of the content of the column.
Widthwidth of columns
Closing tag
Is not optional.
ALIGN Parameter
Defines the horizontal alignment of the content of the columns. This parameter is enabled for all the cells in the column, including the titles of the table, which are defined by tag <TH>. Use the styles or define ALIGN parameter for separate cells of the table to manage the alignment of the content of different elements.
Arguments
Left left alignment of the content.
Centercenter alignment of the content.
Rightright alignment of the content.
None cancels the action of this feature
Default value
left.
Analogue CSS
Text-align
SPAN Parameter
Description
Defines the number of columns the fixed parameters will be applied to. In case this attribute is absent, the tag <COL> works for one column. SPAN Parameter can be used for several columns and form the groups of columns with the same characteristics.
Arguments
Any positive integral value.
Default value
1
VALIGN Parameter
Description
Defines vertical alignment of the content of the column.
Arguments
Baselinethe base line alignment. Browsers don’t support this parameter.
Bottombottom alignment.
Middlemiddle alignment.
Toptop alignment.
Default value
Middle
MIDTH Parameter
Description
Defines the width of the column.
Arguments
The entire value in pixels or percents is used usually. The alternate way is based on the symbol *, which defines the acceptable width.
Default value
Middle.
WIDTH Parameter
Description
Defines the width of the column. In case the width of the content is more than specified one, the browser will try to squeeze in parameters by formatting the text. If it is impossible the width parameter will be ignored.
Arguments
Any positive integral value in pixels or percents is used usually. Alternate variant is based on the use of symbol *, which defines all the acceptable width.
Default value
Width is defined by the content of the cell.
Analogue CSS
width
WordPress contact form
Form builder
CSS forms
Form maker