Markdown with a table:
type: markdown
content: |
<div class="tg-wrap">
<table width=100%>
<tbody>
{%- for i in range(5) -%}
{{
'<tr>
<td>
<ha-icon icon="mdi:bell"></ha-icon>' +
'<span>' +
states("sun.sun") +
'</span>' +
'</td>
<td>' +
states("sun.sun") +
'</td>
</tr>'
}}
{%- endfor -%}
</tbody>
</table>
</div>
card_mod:
style:
ha-markdown $: |
tr td:nth-child(2) {
color: red;
text-align: right;
}
tr:nth-child(2n) {
background-color: rgba(33,33,33,0.2);
}
tr:nth-child(2) td:nth-child(1) {
color: magenta;
}
tr:nth-child(3) td:nth-child(1) ha-icon {
color: orange;
}
tr:nth-child(4) td:nth-child(1) span {
color: magenta;
}