When I started my foray into coding, I picked up from somewhere that tags should be indented with a tree-like structure for readability. The output of the code snippet I allude to ( http://search.cpan.org/dist/HTML-Tiny/lib/HTML/Tiny.pm ) shows such indenting - tags that enclose other tags create an indent while sibling tags are at the same indent level - which is where my confusion and/or frustration came from. To me, the phrasing in the POD said I would get that indenting.

The solution I found was to write my own functions - ti(), to(), and te() - to indent, 'out-dent', and 'equal-dent' the output by means of a global indent level variable. Putting these at the beginning of the line, or sometimes inside the HTML::Tiny autotags, created a nice flowing structure, at least to me. I know that there aren't hard standards for writing the HTML, but I prefer legibility over compactness more times. (likely why I've never gotten the hang of reading/writing obfuscated code)

In reply to Re^2: Properly indented using HTML::Tiny by SnowWolf75
in thread Properly indented using HTML::Tiny by SnowWolf75

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.