HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Select and style elements, where the lang attribute's value starts with "en"
The [attribute|=value] selector is used to select elements with the specified attribute starting with the specified value.
Version: | CSS2 |
---|
The numbers in the table specifies the first browser version that fully supports the selector.
Selector | |||||
---|---|---|---|---|---|
[attribute|=value] | 4.0 | 7.0 | 2.0 | 3.1 | 9.6 |
Select and style elements, where the class attribute's value starts with "top":
[class|=top]
{
background-color: yellow;
}
CSS tutorial: CSS Attribute Selectors