HTML CSS Reference/HTML Attributes Reference/colspan

Материал из Web эксперт
Перейти к: навигация, поиск

"colspan" Example

    
<HTML>
<head><Title>Example For colspan</Title></head>
<BODY>
<table bgcolor="white" width="593" border="1">
   <tr>
      <th colspan="3"> tHeader (3 cells spanned)</th>
      <th height="79" >Second Header</th>
   </tr>
   <tr>
      <td height="79">Cell 1 content</td>
      <td height="79">Cell 2 content</td>
      <td height="79">Cell 3 content</td>
      <td height="79">Cell 4 content</td>
   </tr>
</table>
</BODY>
</HTML>



colspan is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<td>                            <th>                          |
+----------------+--------------------------------------------------------------+



"colspan" Syntax and Note

Note:
    
This attribute sets how many columns in a table a particular cell can span.
    
Syntax:
    
<element colspan="value"> . . . </element>