Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
custom-element {
  display: block;
  border: 2px solid black;
  height: 100px;
  width: 300px;
  padding: 15px;
  position: relative;
}
custom-element:not(:defined) {
  border-color: grey;
  color: grey;
}
custom-element:defined {
  background-color: salmon;
  border-color: maroon;
  color: black;
}
/* show loading message */
custom-element:not(:defined)::before {
  content: "Loading...";
  position: absolute;
  inset: 0 0 0 0;
  align-content: center;
  text-align: center;
  font-size: 25px;
  background-color: white;
}
/* remove the loading message */
custom-element:defined::before {
  content: "";
}
</style>
</head>
<body>
<h1>Demo of :defined</h1>
<custom-element>
<p>Loaded content: Lorem ipsum tel sed tellus eiusmod tellus. Aenean. Semper dolor sit nisi. Elit porttitor nisi sit vivamus.</p>