---
title: "Attribute substring selectors"  
description: "Attribute substring selectors"  
author: "Anonymous User"  
published: 2013-06-14  
updated: 2013-06-15  
canonical: https://www.mindstick.com/forum/1097/attribute-substring-selectors  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# Attribute substring selectors

Hi,\
What is [Attribute](https://www.mindstick.com/blog/221/attributes-reflection) **[Substring](https://www.mindstick.com/articles/12309/how-to-check-if-a-string-contains-a-substring-in-sql-server)** [selectors](https://www.mindstick.com/interview/22831/what-is-the-use-of-selectors-in-objective-c) in [css](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) and how to use this? Any idea! I'm waiting your response.\
Thanks in advance. \

## Replies

### Reply by AVADHESH PATEL

Matches the specified substring of an attribute value\
Note Attribute selectors are not supported in webpages that are displayed in the Microsoft Internet Explorer 5 document mode (also known as "Quirks" mode). To use attribute selectors, add a !DOCTYPE directive that specifies a standard-based document. For more information, see Defining Document Compatibility. \

```
<!DOCTYPE html><html>  <head>    <style type="text/css">      .test        { display:none; }      [attr*="ai"] { display:block; }    </style>  </head>  <body>    <div class="test" attr="Contains">Test for [*=] (Substring) succeeded.</div>  </body></html>
```

\


---

Original Source: https://www.mindstick.com/forum/1097/attribute-substring-selectors

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
