<!DOCTYPE html>
<html lang="en">
<head>
    <title>::selection</title>
</head>
<body>
    <h1>Highlight Me!</h1>
</body>
</html>
h1::selection {
  background:black;
  color:white;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.