<!DOCTYPE html>[href] {border: thin black solid;padding: 4px;}The links with a target attribute gets a yellow background:id="anchor" class="class1 class2" href="http://www.w3cschool.cn"w3cschool.cnid="myAnchor" href="http://www.disney.com" target="_blank"disney.comNote: For [attribute] to work in IE8 and earlier, a DOCTYPE must be declared.