programming-examples/perl/CGI/Create three table rows with the same attributes for each.pl
2019-11-15 12:59:38 +01:00

15 lines
527 B
Perl

#!/usr/bin/perl
use warnings;
use CGI::Pretty;
use strict;
print "Content-type: text/html\n\n";
my $cgi=new CGI;
print $cgi->table({-border=>1,-cellspacing=>3,-cellpadding=>3},
$cgi->Tr({-align=>'center',-valign=>'top'}, [
$cgi->th(["Column1","Column2","Column3"]),]),
$cgi->Tr({-align=>'center',-valign=>'middle'}, [
$cgi->td(["Red","Blue","Yellow"]),
$cgi->td(["Cyan","Orange","Magenta"]),
$cgi->td({-colspan=>3},["A wide row"]),]),
$cgi->caption("An example table")
);