select input with empty value using css

HI guys, I want to select an input element which is empty by using css. I tried
:valid
and
required
attribute. But the field is optional, I wonder is there other ways to select the input with empty value?
div:has(input:empty) p{
// do something
}
<input required />
Was this page helpful?