Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> [class|=top] { background: yellow; } </style> </head> <body> <h1>Demo of the [attribute|=value] selector</h1> <p>Elements with a class attribute value of "top" or "top-" is styled with a yellow background:</p> <h1 class="top-header">Welcome</h1> <p class="top-text">Hello world!</p> <p class="topcontent">Are you learning CSS?</p> </body> </html>