http://qs321.pair.com?node_id=956599


in reply to Perl CGI, font color in a table

Untested:
td ({-style=>"foreground:red"}, escapeHTML("This is a required field") +);
The HTML shortcuts take an optional first argument, a hashref with the elements attributes.

Or you could do:

td (span ({-class=>"required_field"}, escapeHTML("This is a required f +ield")));
And use a style sheet to colour spans of class required_field red. Or you could give the table cell a class (or id) attribute.