Home
CSS
CSS Attr Selectors
Tryit: The [attribute|="value"] selector
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> [class|="top"] { background: yellow; } </style> </head> <body> <h2>CSS [attribute|="value"] Selector</h2> <h1 class="top-header">Welcome</h1> <p class="top-text">Hello world!</p> <p class="topcontent">Are you learning CSS?</p> </body> </html>