Is there a way to add additional params (namely classes) to a th call when using the perl cgi module?
I know we can use a bunch of prints/etc but I want to see if we can use the th
Here’s my th call:
print th({-class=>'myClass'},['Col1','Col2',@MoreColumns]);
It sets the myClass for ALL the columns. I want to set for just one column and/or set diff ones for each column
I would like it to be something like:
<thead>
<tr>
<th class=specialClass>Col1
<th class=AnotherClass>Col2
<th class=ArrayClass>Col3FromArray
<th class=ArrayClass>Col4FromArray
<th class=ArrayClass>Col4FromArray
</tr>
</thead>
Is this possible with perl cgi th([ or do I need to use a bunch of prints/loop?
Your expected HTML or XHTML is invalid.
<th>can only be used in places where<td>is legal; it is not a special<tr>. If you’re expecting XHTML (as opposed to HTML), there are two further problems: all tags must be closed and all attribute values must be quoted.AFAIK the
CGI.pmHTML construction methods can operate on single strings as well. Does the following work?