You can almost achieve HTML table readability with CGI.pm!
#!/usr/bin/perl
# Script: vegetables3.pl
use CGI qw/:standard :html3/;
print header,
start_html('Vegetables'),
h1('Vegetables are for the Strong'),
table({-border=>undef},
caption(strong('When Should You Eat Your Vegetables?')),
Tr({-align=>CENTER,-valign=>TOP},
[
th([ '', 'Breakfast', 'Lunch', 'Dinner' ]),
th( 'Tomatoes').td([ 'no', 'yes', 'yes' ]),
th( 'Broccoli').td([ 'no', 'no', 'yes' ]),
th( 'Onions'). td([ 'yes', 'yes', 'yes' ])
]
)
),
end_html;
|
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Vegetables</TITLE>
</HEAD><BODY><H1>Vegetables are for the Strong</H1>
<TABLE BORDER>
<CAPTION><STRONG>When Should You Eat Your Vegetables?</STRONG></CAPTION>
<TR ALIGN="CENTER" VALIGN="TOP">
<TH></TH>
<TH>Breakfast</TH>
<TH>Lunch</TH>
<TH>Dinner</TH></TR>
<TR ALIGN="CENTER" VALIGN="TOP">
<TH>Tomatoes</TH><TD>no</TD> <TD>yes</TD> <TD>yes</TD></TR>
<TR ALIGN="CENTER" VALIGN="TOP">
<TH>Broccoli</TH><TD>no</TD> <TD>no</TD> <TD>yes</TD></TR>
<TR ALIGN="CENTER" VALIGN="TOP"><TH>Onions</TH><TD>yes</TD> <TD>yes</TD> <TD>yes</TD></TR>
</TABLE>
</BODY></HTML>
|
| Contents | Next |