+ 1
what is <span> ??? and what is colspan ??
I want to know it
3 ответов
+ 7
span is an element and colspan is an attribute..
span example:
<h1>Hello this is example of <span> span element </span>
now in above example, u see that span is inserted within h1 tag.. span is an inline element.. now I can add separate styling to span element it is similar to div but it is inline element, therefore it is just a container with inline properties
and Colspan it is a table element attribute
<table> <tr>
<th>Column 1 heading</th>
<th>Column 2 heading</th>
<th>Column 3 heading</th>
</tr>
<tr>
<td>Row 2, cell 1</td>
<td colspan="2">Row 2, cell 2, also spanning Row 2, cell 3</td>
</tr>
<tr> <td rowspan="2">Row 3, cell 1, also spanning Row 4, cell 1</td>
<td>Row 3, cell 2</td>
<td>Row 3, cell 3</td>
</tr>
<tr>
<td>Row 4, cell 2</td>
<td>Row 4, cell 3</td>
</tr>
</table>
here Colspan with value two, which means that table data width will take up the two fields space in column wise..
and rowspan does the same but in row wise
+ 8
<span> is an inline element for grouping atuff.
Colspan is an attribute for table cells, <td>, specifying how wide they are
+ 1
tnx