:defined represents any element that has been defined. This includes standard elements and custom elements that have been successfully defined.

:defined {
  background-color: #000;
  color: #fff;
}

Standard elements

<p>I'm defined</p>
<small>I'm defined</small>

I'm defined

I'm defined

Undefined custom elements

<unde-fined>I'm not defined</unde-fined>
I'm not defined

Defined custom elements

<de-fined>I'm defined</de-fined>
class BasicComponent extends HTMLElement {
  constructor() {
    super();
  }
}

customElements.define('de-fined', BasicComponent);
I'm defined

Deprecated elements

  <center>test</center>
  <font>test</font>
  <blink>test</blink>
test
test test

My blog doesn't support comments yet, but you can reply via blog@matuzo.at.