in reply to add css to html code

you dont know any perl do you?

What do you expect perl to do when it sees this code?

#----------------------------------# # 2. Print the doctype statement # #----------------------------------# <style> body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } </style> </body>
I'll give you a hint <> is an i/o operation in perl, when it sees <style> it is going to try to read from an opened file named style. That is not what you want at all is it? perl statments are separated by semi-colons, that is a whuge block of stuff with no semi-colons in it.

You expect that to be text, in perl text is inside quotes. For example

#----------------------------------# # 2. Print the doctype statement # #----------------------------------# print ' <style> body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } </style> ';
But you dont understand what your other parts are doing either. When dealing with html the print $query->header; better be run before anything else gets printed. Anything printed before that line will be considered a header, and those statements do not look like headers at all.

Maybe you will even also notice that i too out the </body> part. That is part of the closing protocol of html. You will want to print that last. print '</body>'; will do just fine.

So in short, you need to learn more about perl, and you need to learn more about html or else you are going to be like someone trying to fix his car who only knows that the motor is under the hood. Luckily this wont kill you, like grabbing on to the battery posts or getting your shirt caught in the fan belt could.

Replies are listed 'Best First'.
Re^2: add css to html code
by Anonymous Monk on Apr 21, 2017 at 02:06 UTC
    Thanks