[attribute*=value]
In this chapter you will learn:
- Definition for Selector [attribute*=value]
- An example showing how to use [attribute*=value] CSS selector
Description
The [attribute*=value]
selector selects
every element whose attribute
contains the value
.
Example
<!DOCTYPE html><!-- j a v a2s.c o m-->
<html>
<head>
<style>
div[class*="myStyle"]{
background:red;
}
</style>
</head>
<body>
<div class="myStyle">div element.</div>
<p class="myStyle">paragraph.</div>
</body>
</html>
Next chapter...
What you will learn in the next chapter:
Home » HTML CSS Tutorial » CSS Selector Reference