Home Tutorial Html Html5 HTML5 colspan attribute, Definition of colspan attribute of <td> tag in html5

 
 

HTML5 colspan attribute, Definition of colspan attribute of <td> tag in html5
Posted on: September 15, 2010 at 12:00 AM
In this discussion, We will introduce about the use of colspan attribute of <td> tag in html5.

HTML5 colspan attribute, Definition of colspan attribute of <td> tag in html5

In this discussion, We will introduce about the use of colspan attribute of <td> tag in html5. This attribute is used for specifying the number of column spanned with a cell or table data.

Declaration Syntax:

The declaration of this attribute is as:

<td colspan="value"> Cell Data </td>

Example: colspan_attribute.html

<!DOCTYPE html>
<html>
<head>
<title>Example of colspan attribute</title>
</head>
  <body>
    <table border="1">
            <tr>
              <td colspan="2"> Gyan Singh</td>
            </tr>
            <tr>
              <td> Ankit</td>
              <td> Kumar</td>
            </tr>
            <tr>
              <td> Bikrant</td>
              <td> Singh</td>
            </tr>
    </table>
  </body> 
</html>

Output:

Download This Example

Difference between html4.01 and html5.

Most of the html4.01 attributes are not supported by html5.

Related Tags for HTML5 colspan attribute, Definition of colspan attribute of <td> tag in html5:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.