Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

and the tag set the background color for three columns in a table:

 

   

   

 

 

   

   

   

 

 

   

   

   

 

ISBN Title Price
3476896 My first HTML $53

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the tag.


Tag Definition and Usage Notes

The tag is used to group columns in a table so that they can be formatted.

By using the tag, you can apply styles to an entire column without having to repeatedly set styles for each cell or each row.

**Note:** It can only be used

**Tip:** If you want to


Differences between HTML 4.01 and HTML5

Most attributes from HTML 4.01 are no longer supported in HTML5.


property

the element, after any , , , element, use tag. to define different properties for a certain column in the tag inside the tag.
element, and before any
property Value Description
align left
 right       

 center       

 justify       

 char | HTML5 does not support。Specifies在列组合中内容的水平对齐方式。 |

| char | character | Not supported in HTML5. Specifies which character to use to align content in the column group. | | charoff | number | Not supported in HTML5. Specifies the offset of the first alignment character. | | span | number | Specifies the number of columns the column group should span. | | valign | top
middle
bottom
baseline | Not supported in HTML5. Defines the vertical alignment of content in the column group. | | width | pixels
%
relative_length
| Not supported in HTML5. Specifies the width of the column group. |


Global Attributes

The tag supports [HTML Global Attributes](/tags/ref-standardattributes.html).

Event attribute

The tag supports [HTML Event Attributes](/tags/ref-eventattributes.html).