JSFiddle - React, Tailwind, and code Playground
by Daniel Tan
HTML
<div title="foo">This div has a title.</div>
<div>This div does not have a title.</div>
CSS
div:after {
content: "NO";
}
div[title] {
display: block;
}
div[title]:after {
content: "YES";
}