An option; probably too heavy on the idiom but that’s why it’s fun; for me. :P There are a few others with modern CSS. This is fragmentary HTML—it should be loaded properly in a full page—but it's just for example and modern browsers don't care. <td></td> has caveats in older browsers and maybe IE still for all I know but I will never launch that without being paid. You can put a &nbsp; in it if necessary but using whitespace to control HTML layout is painful to even suggest. :P

#!/usr/bin/env perl
use 5.16.0;
use utf8;
use strictures;
use open ":std", ":encoding(utf8)";

print <<"";
<style>
table {
  border:0;
  border-collapse:collapse;
}
td {
  font-weight:700;
  text-align:center;
  line-height:200%;
  font-size: 150%;
  border:2px solid black;
  width:2em;
  height:2em
}
td.fill {
  background-color:black;
}
</style>

chomp( my @rows = <DATA> );

say "<table>";
for my $row ( @rows )
{
    say "  <tr>";
    for my $col ( split //, $row )
    {
        say $col =~ /\w/ ?
            "    <td>$col</td>"
            :
            "    <td class='fill'></td>";
    }
    say "  </tr>";
}
say "</table>";

__DATA__
л лесопарк
о и о о е
комар р й
л б трасса
ё  к   т б
пасс   ухо
  менеджер
фауна раки
  тоска  г
шкант м  е
    атаман
    в т т
    н ухаб
    игроки
    к грач

In reply to Re: getting html characters to align by Your Mother
in thread getting html characters to align by Aldebaran

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.