Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML col definition

Browser support
IEFFOpSaf
FullFullFullFull

Type: block-level element

Syntax

<col> ... </col>

Description

Defines an attribute value for a column in a table.

Attributes

Attribute Description
span = number Defines the number of columns that should be used by the col element.
width = multi-length Sets the width of a column.

Common attributes.

Example

[Try this example yourself]
<table border="1">
  <colgroup>
    <col width = "10"></col>
    <col width = "40"></col>
  </colgroup>
  <tr>
    <td>Hi</td>
    <td>Hello</td>
  </tr>
</table>

Output

Hi Hello
  • Comments

No comments added.