The element
selector adds style to all elements
with the specified element name.
Examples:
body {background: #FFF;} p {font-size: 1em;}
element { style properties }
element |
Yes | Yes | Yes | Yes | Yes |
An example showing how to use element CSS selector
<!DOCTYPE html>
<html>
<head>
<style>
p{<!-- w w w .j a va 2 s .co m-->
background-color:red;
}
</style>
</head>
<body>
<p>java2s.com.</p>
</body>
</html>