CSS Tutorial

CSS Style

CSS Layout Style

CSS Float Style

CSS Reference

CSS element[attr^=value] Selector

What is [att^=value] Selector?

CSS [att^=value] selector matches all elements whose attribute value beginning with value string.

Browser Compatibility

  • Google Chrome 2+
  • Mozilla Firefox 3+
  • Internet Explorer 9+
  • Opera 9.5+
  • Safari 1.3+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.


This is general syntax,

[attr^=value] {
	property: value;
	property: value;


Select every element whose attribute class value beginning with dem string to apply CSS style.

<style type="text/css">
a[class^=dem] {
    <a class="demo" href="#">English International</a><br />
    <a class="de" href="#">English US</a><br />
    <a class="demos" href="#">Google</a><br />

Run it...   »

Example Result: