Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Newlines in HTML::LoL

by Your Mother (Archbishop)
on Feb 01, 2021 at 18:53 UTC ( [id://11127760]=note: print w/replies, xml ) Need Help??


in reply to Newlines in HTML::LoL

Never use HTML to achieve layout, only semantic structure. All formatting should be via CSS. Use templates. They are easy once you get the hang of them. HTML widgets are not your friend, especially not long term and super duper especially not 19 year-old abandonware with perl4 idioms. CGI has better HTML routines in it, should it come to that, and is tested and current.

<html lang="en-lolcat"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" / +> <title>I CAN HAZ FRENS?</title> <style type="text/css" media="all"> html,body { height:100%; width: 100%; font-family:"trebuchet ms","helvetica neue",helvetica,sans-serif; margin: 5% 10%; padding: 0; font-size:16px; } h1.literal { white-space:pre; } h1.hang { text-indent:-2rem; margin-left:2rem; } </style> </head> <body> <h1 class="literal">OHAI DER, …FREN</h1> <h3>…or possibly more correct…</h3> <h1 class="hang">OHAI DER,<br/>…FREN</h1> <p>Other options no doubt exist at this point in the CSS game.</p> </body> </html>

Replies are listed 'Best First'.
Re^2: Newlines in HTML::LoL
by LanX (Saint) on Feb 01, 2021 at 19:10 UTC
    > CGI has better HTML routines in it, should it come to that, and is tested and current.

    agreed, but the current maintainer is discouraging the use.°

    https://metacpan.org/pod/CGI#HTML-Generation-functions-should-no-longer-be-used

    I'd rather prefer to have them factored out into an extra module and maintained by someone else. (this is NOT a critic of Lee!!!)

    I'm wondering if SawyerX' talk about how "CGI must die" went too far in it's effects ...

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) which is why I didn't mention it.

Re^2: Newlines in HTML::LoL
by Bod (Parson) on Feb 01, 2021 at 23:24 UTC
    All formatting should be via CSS. Use templates. They are easy once you get the hang of them

    I'll second that!
    As a recent convert to templates, there is no way I would use anything else now.

    Template is easy to use and very versatile

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127760]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-03-29 00:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found