This page is part of the CSS3.info CSS selectors test. See more info on CSS3 selectors.

  1. div[align=left] {
    }
    
    <div align='left'></div>

    The CSS selector should match the HTML fragment because the align attribute has the correct value

  2. div[align=left] {
    }
    
    <div ALIGN='left'></div>

    The CSS selector should match the HTML fragment because attribute names should be case insensitive in a HTML document

  3. div[align=left] {
    }
    
    <div align='LEFT'></div>

    The CSS selector should match the HTML fragment because the value of the align attribute should be case insensitive in a HTML document

  4. div[align=left] {
    }
    
    <div align='leftorright'></div>

    The CSS selector should not match the HTML fragment because the value of the align attribute is not an exact match

  5. div[align=left] {
    }
    
    <div align='rightleft'></div>

    The CSS selector should not match the HTML fragment because the value of the align attribute is not an exact match

  6. div[align=left] {
    }
    
    <div align='right'></div>

    The CSS selector should not match the HTML fragment because the value of the align attribute is completely different

  7. div[align=left] {
    }
    
    <div alignment='left'></div>

    The CSS selector should not match the HTML fragment because the attribute does not exist

  8. div[align=left] {
    }
    
    <div verticalalign='left'></div>

    The CSS selector should not match the HTML fragment because the attribute does not exist

  9. div[align=left] {
    }
    
    <div></div>

    The CSS selector should not match the HTML fragment because the attribute does not exist

  10. div[align = left] {
    }
    
    <div align='left'></div>

    The CSS selector should match the HTML fragment because the align attribute has the correct value

  11. div[align =left] {
    }
    
    <div align='left'></div>

    The CSS selector should match the HTML fragment because the align attribute has the correct value

  12. div[align= left] {
    }
    
    <div align='left'></div>

    The CSS selector should match the HTML fragment because the align attribute has the correct value

  13. div[title=match] {
    }
    
    <div title='match'></div>

    The CSS selector should match the HTML fragment because the value of the title attribute is an exact match

  14. div[title=match] {
    }
    
    <div title='MATCH'></div>

    The CSS selector should not match the HTML fragment because value of the title attribute should be compared in a case-sensitive way

  15. div[id=match] {
    }
    
    <div id='MATCH'></div>

    The CSS selector should not match the HTML fragment because value of the id attribute should be compared in a case-sensitive way

  16. label[for=match] {
    }
    
    <label for='MATCH'></label>

    The CSS selector should not match the HTML fragment because value of the for attribute should be compared in a case-sensitive way

  17. div[align=left] {
    }
    
    <div align=' left '></div>

    The CSS selector should not match the HTML fragment because the value of the align attribute is not an exact match - it is not allowed to strip whitespace in HTML documents