<tr>
    <td></td>
    <td class="c-header">IA</td>
    <td colspan="16"></td>
    <td class="c-header">0</td>
</tr><tr>
    <td class="r-header">1</td>
    <td class="p-elem green {% if 'H' in selected_elements %} selected {% endif %}">H</td>
    <td class="c-header">IIA</td>
    <td colspan="10" class="title">Select one element by clicking on the element.</td>
    <td class="c-header">IIIA</td>
    <td class="c-header">IVA</td>
    <td class="c-header">VA</td>
    <td class="c-header">VIA</td>
    <td class="c-header">VIIA</td>
    <td class="p-elem orange {% if 'He' in selected_elements %} selected {% endif %}">He</td>
</tr><tr>
    <td class="r-header">2</td>
    <td class="p-elem blue {% if 'Li' in selected_elements %} selected {% endif %}">Li</td>
    <td class="p-elem lightblue {% if 'Be' in selected_elements %} selected {% endif %}">Be</td>
    <td colspan="10"></td>
    <td class="p-elem purple {% if 'B' in selected_elements %} selected {% endif %}">B</td>
    <td class="p-elem green {% if 'C' in selected_elements %} selected {% endif %}">C</td>
    <td class="p-elem green {% if 'N' in selected_elements %} selected {% endif %}">N</td>
    <td class="p-elem green {% if 'O' in selected_elements %} selected {% endif %}">O</td>
    <td class="p-elem yellow {% if 'F' in selected_elements %} selected {% endif %}">F</td>
    <td class="p-elem orange {% if 'Ne' in selected_elements %} selected {% endif %}">Ne</td>
</tr><tr>
    <td class="r-header">3</td>
    <td class="p-elem blue {% if 'Na' in selected_elements %} selected {% endif %}">Na</td>
    <td class="p-elem lightblue {% if 'Mg' in selected_elements %} selected {% endif %}">Mg</td>
    <td class="c-header">IIIB</td>
    <td class="c-header">IVB</td>
    <td class="c-header">VB</td>
    <td class="c-header">VIB</td>
    <td class="c-header" colspan="3">VIIB</td>
    <td class="c-header">VIIIB</td>
    <td class="c-header">IB</td>
    <td class="c-header">IIB</td>
    <td class="p-elem cyan {% if 'Al' in selected_elements %} selected {% endif %}">Al</td>
    <td class="p-elem purple {% if 'Si' in selected_elements %} selected {% endif %}">Si</td>
    <td class="p-elem green {% if 'P' in selected_elements %} selected {% endif %}">P</td>
    <td class="p-elem green {% if 'S' in selected_elements %} selected {% endif %}">S</td>
    <td class="p-elem yellow {% if 'Cl' in selected_elements %} selected {% endif %}">Cl</td>
    <td class="p-elem orange {% if 'Ar' in selected_elements %} selected {% endif %}">Ar</td>
</tr><tr>
    <td class="r-header">4</td>
    <td class="p-elem blue {% if 'k' in selected_elements %} selected {% endif %}">K</td>
    <td class="p-elem lightblue {% if 'Ca' in selected_elements %} selected {% endif %}">Ca</td>
    <td class="p-elem gray {% if 'Sc' in selected_elements %} selected {% endif %}">Sc</td>
    <td class="p-elem gray {% if 'Ti' in selected_elements %} selected {% endif %}">Ti</td>
    <td class="p-elem gray {% if 'V' in selected_elements %} selected {% endif %}">V</td>
    <td class="p-elem gray {% if 'Cr' in selected_elements %} selected {% endif %}">Cr</td>
    <td class="p-elem gray {% if 'Mn' in selected_elements %} selected {% endif %}">Mn</td>
    <td class="p-elem gray {% if 'Fe' in selected_elements %} selected {% endif %}">Fe</td>
    <td class="p-elem gray {% if 'Co' in selected_elements %} selected {% endif %}">Co</td>
    <td class="p-elem gray {% if 'Ni' in selected_elements %} selected {% endif %}">Ni</td>
    <td class="p-elem gray {% if 'Cu' in selected_elements %} selected {% endif %}">Cu</td>
    <td class="p-elem gray {% if 'Zn' in selected_elements %} selected {% endif %}">Zn</td>
    <td class="p-elem cyan {% if 'Ga' in selected_elements %} selected {% endif %}">Ga</td>
    <td class="p-elem purple {% if 'Ge' in selected_elements %} selected {% endif %}">Ge</td>
    <td class="p-elem purple {% if 'As' in selected_elements %} selected {% endif %}">As</td>
    <td class="p-elem green {% if 'Se' in selected_elements %} selected {% endif %}">Se</td>
    <td class="p-elem yellow {% if 'Br' in selected_elements %} selected {% endif %}">Br</td>
    <td class="p-elem orange {% if 'Kr' in selected_elements %} selected {% endif %}">Kr</td>
</tr><tr>
    <td class="r-header">5</td>
    <td class="p-elem blue {% if 'Rb' in selected_elements %} selected {% endif %}">Rb</td>
    <td class="p-elem lightblue {% if 'Sr' in selected_elements %} selected {% endif %}">Sr</td>
    <td class="p-elem gray {% if 'Y' in selected_elements %} selected {% endif %}">Y</td>
    <td class="p-elem gray {% if 'Zr' in selected_elements %} selected {% endif %}">Zr</td>
    <td class="p-elem gray {% if 'Nb' in selected_elements %} selected {% endif %}">Nb</td>
    <td class="p-elem gray {% if 'Mo' in selected_elements %} selected {% endif %}">Mo</td>
    <td class="p-elem gray {% if 'Tc' in selected_elements %} selected {% endif %}">Tc</td>
    <td class="p-elem gray {% if 'Ru' in selected_elements %} selected {% endif %}">Ru</td>
    <td class="p-elem gray {% if 'Rh' in selected_elements %} selected {% endif %}">Rh</td>
    <td class="p-elem gray {% if 'Pd' in selected_elements %} selected {% endif %}">Pd</td>
    <td class="p-elem gray {% if 'Ag' in selected_elements %} selected {% endif %}">Ag</td>
    <td class="p-elem gray {% if 'Cd' in selected_elements %} selected {% endif %}">Cd</td>
    <td class="p-elem cyan {% if 'In' in selected_elements %} selected {% endif %}">In</td>
    <td class="p-elem cyan {% if 'Sn' in selected_elements %} selected {% endif %}">Sn</td>
    <td class="p-elem purple {% if 'Sb' in selected_elements %} selected {% endif %}">Sb</td>
    <td class="p-elem purple {% if 'Te' in selected_elements %} selected {% endif %}">Te</td>
    <td class="p-elem yellow {% if 'I' in selected_elements %} selected {% endif %}">I</td>
    <td class="p-elem orange {% if 'Xe' in selected_elements %} selected {% endif %}">Xe</td>
</tr><tr>
    <td class="r-header">6</td>
    <td class="p-elem blue {% if 'Cs' in selected_elements %} selected {% endif %}">Cs</td>
    <td class="p-elem lightblue {% if 'Ba' in selected_elements %} selected {% endif %}">Ba</td>
    <td class="p-elem gray {% if 'La' in selected_elements %} selected {% endif %}">La</td>
    <td class="p-elem gray {% if 'Hf' in selected_elements %} selected {% endif %}">Hf</td>
    <td class="p-elem gray {% if 'Ta' in selected_elements %} selected {% endif %}">Ta</td>
    <td class="p-elem gray {% if 'W' in selected_elements %} selected {% endif %}">W</td>
    <td class="p-elem gray {% if 'Re' in selected_elements %} selected {% endif %}">Re</td>
    <td class="p-elem gray {% if 'Os' in selected_elements %} selected {% endif %}">Os</td>
    <td class="p-elem gray {% if 'Ir' in selected_elements %} selected {% endif %}">Ir</td>
    <td class="p-elem gray {% if 'Pt' in selected_elements %} selected {% endif %}">Pt</td>
    <td class="p-elem gray {% if 'Au' in selected_elements %} selected {% endif %}">Au</td>
    <td class="p-elem gray {% if 'Hg' in selected_elements %} selected {% endif %}">Hg</td>
    <td class="p-elem cyan {% if 'Tl' in selected_elements %} selected {% endif %}">Tl</td>
    <td class="p-elem cyan {% if 'Pb' in selected_elements %} selected {% endif %}">Pb</td>
    <td class="p-elem cyan {% if 'Bi' in selected_elements %} selected {% endif %}">Bi</td>
    <td class="p-elem purple {% if 'Po' in selected_elements %} selected {% endif %}">Po</td>
    <td class="p-elem yellow {% if 'At' in selected_elements %} selected {% endif %}">At</td>
    <td class="p-elem orange {% if 'Rn' in selected_elements %} selected {% endif %}">Rn</td>
</tr><tr>
    <td class="r-header">7</td>
    <td class="p-elem blue {% if 'Fr' in selected_elements %} selected {% endif %}">Fr</td>
    <td class="p-elem lightblue {% if 'Ra' in selected_elements %} selected {% endif %}">Ra</td>
    <td class="p-elem gray {% if 'Ac' in selected_elements %} selected {% endif %}">Ac</td>
    <td colspan="12"></td>
</tr><tr>
    <td colspan="19"></td>
</tr><tr>
    <td colspan="4" class="r-header">Lanthanides</td>
    <td class="p-elem darkgray {% if 'Ce' in selected_elements %} selected {% endif %}">Ce</td>
    <td class="p-elem darkgray {% if 'Pr' in selected_elements %} selected {% endif %}">Pr</td>
    <td class="p-elem darkgray {% if 'Nd' in selected_elements %} selected {% endif %}">Nd</td>
    <td class="p-elem darkgray {% if 'Pm' in selected_elements %} selected {% endif %}">Pm</td>
    <td class="p-elem darkgray {% if 'Sm' in selected_elements %} selected {% endif %}">Sm</td>
    <td class="p-elem darkgray {% if 'Eu' in selected_elements %} selected {% endif %}">Eu</td>
    <td class="p-elem darkgray {% if 'Gd' in selected_elements %} selected {% endif %}">Gd</td>
    <td class="p-elem darkgray {% if 'Tb' in selected_elements %} selected {% endif %}">Tb</td>
    <td class="p-elem darkgray {% if 'Dy' in selected_elements %} selected {% endif %}">Dy</td>
    <td class="p-elem darkgray {% if 'Ho' in selected_elements %} selected {% endif %}">Ho</td>
    <td class="p-elem darkgray {% if 'Er' in selected_elements %} selected {% endif %}">Er</td>
    <td class="p-elem darkgray {% if 'Tm' in selected_elements %} selected {% endif %}">Tm</td>
    <td class="p-elem darkgray {% if 'Yb' in selected_elements %} selected {% endif %}">Yb</td>
    <td class="p-elem darkgray {% if 'Lu' in selected_elements %} selected {% endif %}">Lu</td>
    <td></td>
</tr><tr>
    <td colspan="4" class="r-header">Actinides</td>
    <td class="p-elem darkgray {% if 'Th' in selected_elements %} selected {% endif %}">Th</td>
    <td class="p-elem darkgray {% if 'Pa' in selected_elements %} selected {% endif %}">Pa</td>
    <td class="p-elem darkgray {% if 'U' in selected_elements %} selected {% endif %}">U</td>
    <td class="p-elem darkgray {% if 'Np' in selected_elements %} selected {% endif %}">Np</td>
    <td class="p-elem darkgray {% if 'Pu' in selected_elements %} selected {% endif %}">Pu</td>
    <td class="p-elem darkgray {% if 'Am' in selected_elements %} selected {% endif %}">Am</td>
    <td class="p-elem darkgray {% if 'Cm' in selected_elements %} selected {% endif %}">Cm</td>
    <td class="p-elem darkgray {% if 'Bk' in selected_elements %} selected {% endif %}">Bk</td>
    <td class="p-elem darkgray {% if 'Cf' in selected_elements %} selected {% endif %}">Cf</td>
    <td class="p-elem darkgray {% if 'Es' in selected_elements %} selected {% endif %}">Es</td>
    <td class="p-elem darkgray {% if 'Fm' in selected_elements %} selected {% endif %}">Fm</td>
    <td class="p-elem darkgray {% if 'Md' in selected_elements %} selected {% endif %}">Md</td>
    <td class="p-elem darkgray {% if 'No' in selected_elements %} selected {% endif %}">No</td>
    <td class="p-elem darkgray {% if 'Lr' in selected_elements %} selected {% endif %}">Lr</td>
    <td></td>
</tr>