Difference between colspan and span | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Difference between colspan and span

14th Apr 2021, 6:58 PM
shaik masthan javid vali
shaik masthan javid vali - avatar
3 Respuestas
+ 6
colspan attribute is used to set the number of columns a cell should span in a table. Span element is a generic inline container for phrasing content, which does not inherently represent anything.
14th Apr 2021, 8:17 PM
Matias
Matias - avatar
+ 2
<span> is an inline tag https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span meanwhile colspan is an attribute only valid for <th> oŇē <td> table tags https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table#complicated_tables
16th Apr 2021, 5:26 PM
David Ord√°s
David Ord√°s - avatar
0
colspan is an attribute in tables that is used to make 2 or more columns into single column span is an inline tag that is usef to highlight small portion of the text of image Both of them purpose is different
2nd Nov 2021, 6:15 AM
sree harsha
sree harsha - avatar