0
<td> Block or Inline
Question for all you coding gurus out there. Is <td> considered block or inline? For example, if it is inline then I would not be able to code <td> <div></div></td>. If it is block, then I would be able to (I think?). I'm asking so I can determine whether or not I can use <span> with a table data cell in order to integrate CSS with it or add some sort of colour. Thanks!
3 Respuestas
+ 3
Brett Surbey try it and see what happens.
+ 1
Good point!
+ 1
I guess the short answer is that it depends.
The technical answer is:
Default CSS Settings
Most browsers will display the <td> element with the following default values:
td {
display: table-cell;
vertical-align: inherit;
}
(citation: https://www.w3schools.com/tags/tag_td.asp )