>
<style>
div {
  font: 25px/1 Ahem;
}
.fail {
  position: absolute;
  color: red;
  z-index: -1;
}
span { color: green; }
.test {
  color: green;
  width: 4ch;

  white-space: break-spaces;
  overflow-wrap: anywhere;
}
</style>
<body>
  <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
  <div class="fail">XXXX<br><span>X</span>XX<span>X</span><br><span>XXXX</span><br><span>XXXX</span></div>
  <div class="test">XXXX XX</div>
</body>
