Perl CGI Programming
HTML Elements: Content Indicators
#!/usr/bin/perl
use CGI;
use strict;
my $query=new CGI;
# Create a header, and let it default arguments, it likely knows
# better then we do.
print $query->header();
# Start the body of our document, and give it a title (shows up on the
# browser bar and on printouts). All the legal fields within the HTML
# "BODY" tag are supported, and are optional. Other unsupported
# options can be specified as well, and will be correctly added. Note
# that there is nothing actually in the body tag, just HTML modifiers
# being specified.
print $query->start_html({-title=>'Testing...',
-author=>'Bill Kilgallon'});
# Content based tags...
# print $query->abbr('This is an abbreviation'); not supported
# print $query->acronym('This is an acronym'); not supported
print $query->cite('This is a citation');
print $query->br();
print $query->code('This is code');
print $query->br();
print $query->dfn('This is the defining instance');
print $query->br();
print $query->em('This is emphasized');
print $query->br();
print $query->kbd('This is keyboard input');
print $query->br();
print $query->samp('This is a sequence of literal characters');
print $query->br();
print $query->strong('This is strong text');
print $query->br();
print $query->var('This is a variable');
# And finally, end the document.
print $query->end_html;
Back to Syllabus
Previous: HTML Elements: Headings
Next: HTML Elements: Text Modifiers