No, really, it is all there. You just need to know where to look.

Ok, that's not strictly true. All that you need to know about using the Perl module is in the Perl module documentation. But the documentation assumes that you know about HTML elements and attributes (how they are used, which ones are valid in which situation, stuff like that) so it doesn't contain information about that. For that you'll need a guide to HTML.

And even then, the documentation isn't arranged as you think it should be. There aren't sections called "all you want to know about creating tables", "all you want to know about creating lists", etc. That's for two reasons. Firstly, the way that you create element and attributes is standardised. The section on creating tables would be almost identical about the section on creating lists, so the documentation would get very repetative. Instead, there's a section on Creating Standard HTML Elements which explains the rules. You're supposed to be able to read that and extrapolate the information that you need. Secondly, if the documentation was to try and list all of the HTML elements and attributes supported by all of the browsers then it would a) be very long and b) go out of date every time a browser was updated. It's far better to have the current method which allows you to create _any_ element with _any_ attribute. That way it never goes out of date.

So, to answer your specific questions:

Oh, and as others have pointed out, creating HTML using these CGI.pm methods can make for rather hard to maintain code. In my opinion, you'll be much better off using a decent templating system.

Hope that makes it clearer.


In reply to Re^3: How to do tables by davorg
in thread How to do tables by kmullin5016

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.