in reply to CGI

See, the greatest thing about CGI.pm is the ability to define your own HTML tags using it. Example:
use CGI qw/shortcuts font/; $q = new CGI; print $q->font ({size=>'1',color=>'red'}, $q->p("Heyyy"));
But the problem is, why would you want to do this? Why not just print <font size=1 color=red><p>Heyyy</p>? Sorry if I sounded harsh, no hurt intended :-)

Wanna be perl hacker.
Dave AKA damian

Replies are listed 'Best First'.
(Ovid - why font tags are bad) Re: Re: CGI
by Ovid (Cardinal) on Dec 22, 2000 at 04:13 UTC
    ...why would you want to do this? Why not just print <font size=1 ...
    Stylesheets are here to stay and they are a Good Thing. Font tags are deprecated. HTML tags and their attributes should only be used to mark the structural elements of your documents and CSS should be used to control the layout of those elements. But don't take my word for it, see what w3c has to say about it.

    This is actually related to the problem of why CGI scripts shouldn't have HTML embedded in them (unless it's a simple script). Form and content should be kept distinct. I am constantly working on scripts that have CSS, Javascript, HTML and Perl all tossed together and blended well. Rarely are you working on all of the elements simultaneously. You focus on one at a time and this is tougher to do when their mixed (not to mention what happens when you're asked to change the look and feel of all of the pages).

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.