Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

CSS | [attribute*=value] Selector

  • Last Updated : 08 Jan, 2019

The [attribute*=”str”] selector is used to select those elements whose attribute value contains the specified sub string str. This sub string could be at the start, end or in the middle of the class.


element [attribute*="str"] {
    // CSS Property


<!DOCTYPE html>
            CSS [attribute*="str"] Selector
        <!-- CSS property -->
            p[class*="for"] {
                background: green;
                color: white;
        <h2>[attribute*=value] Selector</h2>
        <p class="GeeksforGeeks">GeeksforGeeks</div>
        <p class="forGeeks">A computer science portal</div>
        <p class="Geeks">Sudo GATE</p>
        <p class="for">Sudo placement</p>


Supported Browsers: The browser supported by [attribute*=value] Selector are listed below:

  • Google Chrome 4.0
  • Internet Explorer 7.0
  • Firefox 3.5
  • Apple Safari 3.2
  • Opera 9.6
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!