div[class^="test"] { background: #ffff00; } a[href^="http"] { background: url(path/to/external/icon.png) no-repeat; }