fuente: http://www.css3.info
a) E[attribute^=value] (value begins exactly with a given string) a[href^="http:"]{color:#000 !important; text-decoration:none} b) E[attribute|=value] (value either equal to a given string or starting with that string followed by a hyphen (-)) a[href|="css"]{ color:#f00 !important } c) E[attribute$=value] (value ending exactly with a given string) a[href$="/css"]{ color:#666 !important } d) E[attribute*=value] (value containing the a given substring) a[href*="net"]{ color:#999 !important } e) E[attribute~=value]] (value containing a given word, delimited by spaces) a[title~="buscador"]{color:#CCC !important}(in this example... is not delimited with spaces :S
Ejemplo
a)<a href="http://www.estravagancia.com/" target="_blank">enlace</a> -- enlace b)<a href="css-ejemplos" target="_blank">enlace</a> -- enlace 1)<a href="css" target="_blank">enlace</a> -- enlace c)<a href="http://www.estravagancia.com/css" target="_blank">enlace</a> -- enlace d)<a href="http://www.estravagancia.net/" target="_blank">enlace</a> -- enlace e)<a href="http://www.google.es/" title="Web del buscador google" target="_blank">enlace</a> -- enlace
Estilos utilizados:
a[href^="http:"]{color:#000 !important; text-decoration:none}
a[href|="css"]{ color:#f00 !important }
a[href$="/css"]{ color:#666 !important }
a[href*="net"]{ color:#999 !important }
a[title~="Web"]{color:#CCC !important}