You are generating a p
element between the two img
elements. By default, a p
element is rendered as a block and with some margin above and below. The align
attributes modify the rendering, but to make the images appear on both sides of the text, change the order so that both img
elements precede the p
element, i.e. use the order
print $cgi->img({ -src => "http://127.0.0.1/pic2.png", -align => "left" });
print $cgi->img({ -src => "http://127.0.0.1/pic1.png", -align => "right" });
print $cgi->p({ -align => "middle" }, "Projekt Zeus");