Attribute on Image in HTML and CSS - Tryit Editor for Web Developers
Edit This Code:
See Result »
<html> <head> <style> [title~=logo] { border: 5px solid red; } </style> </head> <body> <p>All images with the title attribute containing the word <b>"logo"</b> get a red border.</p> <img src="logo.jpg" title="logo" width="200" height="100"> <img src="logo.jpg" title="logo" width="250" height="150"> <img src="logo.jpg" title="T4" width="200" height="200"> </body> </html>
Result: