in reply to beautiful form(s) with CGI uses boostrap among other things. To make your task easier, download and customise bootstrap, once you've got everything looking the way you want witout involving Perl use this as the basis for your template. If you are considering using CGIs built in CGI HTML generation facilties I'd strongly advise against this. See Template/HTML::Template for example.

On a related note there are other frameworks which can make this sort of development easier, (from CGI) note: HAS BEEN REMOVED FROM THE PERL CORE

If you upgrade to a new version of perl or if you rely on a system or vendor perl and get an updated version of perl through a system update, then you will have to install yourself with cpan/cpanm/a vendor package/manually. To make this a little easier the CGI::Fast module has been split into its own distribution, meaning you do not need acces to a compiler to install

The rationale for this decision is that is no longer considered good practice for developing web applications, including quick prototyping and small web scripts. There are far better, cleaner, quicker, easier, safer, more scalable, more extensible, more modern alternatives available at this point in time. These will be documented with CGI::Alternatives.

For more discussion on the removal of from core please see:

Update: Edited formatting.