Html table colspan attribute?

Hi there,

Using a colspan attribute in a html table, why does it take an integer value as a string, trying to understand…


Thanks so much.

Hi Paul,

every HTML attribute needs to be passed value in quotation marks, no matter the “data type”. These quotation marks do not symbolize a string, rather they indicate to the browser that they are passing a value to the attribute.

In the same way that the href attribute below does not get passed a string, but a link.

<a href="">Hey!</a>

Remember that HTML is a markup language rather than a programming one and so the whole concept of data types we see in languages such as JavaScript does not really exist here.


Thanks so much, appreciate it, now I get it…