<col> tag in HTML

The <col> tag used to specifies properties of each column within a <colgroup> element. It is very useful for applying styles to entire columns, instead of repeating the styles for each cell.

Important Description

  • The <col> tag is empty tag, it means <col> tag has no end tag.
  • The <col> tag must be closed in XHTML.
  • Most of the attributes in HTML 4.01 are not supported in HTML5.

Example of <col> Tag

Result Look Like

Title Descriptions
HTML Hyper Text Markup Language
CSS Cascading Style Sheets

<col> Tag Browser Support

Element Chrome Edge Firefox Safari Opera
<col> Yes Yes Yes Yes Yes

Global Attributes

Event Attributes

Attributes

Attribute Value Description
align right
left
center
justify
char
Defines horizontal alignment, not supported in HTML5.
char character Defines a character to use to align text on (use with align = "char"), not supported in HTML5.
charoff number Specifies the number of characters the content will be aligned from the character by the char attribute, not supported in HTML5.
span number Specifies the number of columns a <col> element should span
valign top
middle
bottom
baseline
Specifies the vertical alignment of the content related to a <col> element, not supported in HTML5.
width %
pixels
relative_length
Specifies the width of a <col> element, not supported in HTML5.

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)