I want to add different content via CSS.
If there is a link within <td></td>
it should show YaY and if there is no link it should show Boo.
But Boo is never displayed, I have tried different combination of :not()..
Its part of a software where I can't add HTML code, just can change CSS.
.demo-td-1 > a::before {
content: "YaY ";
}
.demo-td-1 > :not(a)::before {
content: "Boo ";
}
<table>
<tr><td class="demo-td-1"><a href="#">foo</a></td></tr>
<tr><td class="demo-td-1">bar</td></tr>
</table>