element,element
In this chapter you will learn:
Description
To style several elements with the same style, we can
separate each element name with a comma. In this way we group
the selectors together and style them the same time.
element,element
is called group selector.
Example
<!DOCTYPE html><!-- j a v a2 s . c o m-->
<html>
<head>
<style>
h1,p
{
background-color:red;
}
</style>
</head>
<body>
<h1>h1</h1>
<p>paragraph.</p>
</body>
</html>
Next chapter...
What you will learn in the next chapter:
Home » HTML CSS Tutorial » CSS Selector Reference