Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of attribute selector</title> <style> [class*="warning"] { color: #fff; background: red; } </style> </head> <body> <p class="warning">The style will apply to this paragraph.</p> <p class="alert warning">The style will also apply to this paragraph.</p> <p class="alert-warning">The style will also apply to this paragraph.</p> <p class="alert_warning">The style will also apply to this paragraph.</p> <p class="highlight">The style will not apply to this paragraph.</p> </body> </html>