HTML Tag <COL>

HTML Tag <COL>

<COL> Specifies attributes for a table column.

Attribute of <COL> Tag

ALIGN

Specifies how text within the table columns will line up with the edges of the table cells, or if ALIGN=CHAR, on a specific character (the decimal point).

<COL ALIGN="CENTER">

Possible Values

LEFT, RIGHT, CENTER, JUSTIFY, CHAR



CHAR

Specifies the character on which cell contents will align, if ALIGN="CHAR". If you omit CHAR=, the default value is the decimal point in the specified language.

<COL ALIGN="CHAR" CHAR=",">

Possible Values

Any Character.



CHAROFF

Specifies the number of characters from the left at which the alignment character appears..

<COL ALIGN="CHAR" CHAR="," CHAROFF="7">

Possible Values

Any Integer Number.



ID

Assigns a unique ID selector to an instance of the <COL> tag. When you assign a style to that ID selector, it affects only that one instance of the <COL> tag.

<COL ID="dkm">

Possible Values

Any ID Name that you define.



SPAN

Indicates the number of columns in the group.

<COLGROUP> <COL ALIGN="RIGHT" SPAN="2">

Possible Values

Any positive Integer Number.



STYLE

Specifies Style Sheet commands that apply to the contents of the <COL> tags.

<COL STYLE="background: black">

Possible Values

CSS Property with value.



TITLE

Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the table column.

<COL TITLE="Table column">

Possible Values

Any Text Message.



VALIGN

Vertically positions the contents of the table column. VALIGN="TOP" positions the contents flush with the top of the column. VALIGN= "BUTTON" positions the contents flush with the bottom. VALIGN="CENTER" positions the contents at the center of the column. VALIGN= "BASELINE" aligns the contents with the baseline of the current text font.

<COL VALIGN="TOP">

Possible Values

TOP, BOTTOM, BASELINE, MIDDLE



WIDTH

Specifies the horizontal dimension of a column (in pixels or as a percentage). Special values of "0*" force the column to the minimum required width, and "2*" requires that the column receive proportionately twice as much space as it otherwise would.

<COL WIDTH="100">

Possible Values

value in pixel or percentage.




CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad