Compare [att|=val] and [att^=val] selector - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

Compare [att|=val] and [att^=val] selector

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
span[att|="simple"] {
   color:Chartreuse;
}

span[att^="simple"] {
   font-weight:bold;
}
</style> <!--  w w w  . j a  v a2 s  .com-->
 </head> 
 <body> 
  <span att="simple-attribute-name"> <p>Lorem ipsum dol</p> </span> 
  <span att="simpleattributename"> <p>Lorem ipsum dolo</p> </span>  
 </body>
</html>

Related Tutorials