Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
a[target] {
  background-color: yellow;
}
p[lang] {
  background-color: salmon;
}
</style>
</head>
<body>
<h1>Demo of the [attribute] selector</h1>
<p>Links with a target attribute is styled with a yellow background color:</p>
<a href="https://www.w3schools.com">W3schools.com</a><br>
<a href="https://www.google.com" target="_blank">Google.com</a><br>
<a href="https://www.microsoft.com" target="_blank">Microsoft.com</a>
<p>Paragraphs with a lang attribute is styled with a salmon background color:</p>
<p>Hello world!</p>
<p lang="no">Hei verden!</p>
<p lang="it">Salve, mondo!</p>
</body>
</html>