Selector Unions
A list of comma-separated selectors apply to the union of all of the elements.
The selector union has the following syntax:
<selector>, <selector>, <selector>
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
<style type="text/css">
a, [lang|="en"] {
border: thin black solid;
padding: 4px;
}
</style>
</head>
<body>
<a href="http://java2s.com"> Visit the java2s.com </a>
<span lang="en-uk">HTML</span>
</body>
</html>
Home
HTML CSS Book
CSS
HTML CSS Book
CSS
Selectors Combination:
- Selector Unions
- Selecting Descendant Elements
- Selecting Child Elements
- Immediate Sibling Selector
- General Sibling Selector
Related: