Specificity means that more specific selectors are given priority over less specific selectors
<html>
<head>
<title>Specificity</title>
<style type="text/css">
body {
background-color: red;
font-size: 1.3em;
color: white;
font-family: Arial, sans-serif;
}
p {
color: navy;
}
p b {
color: white;
}
b#cyan {
color: cyan;
}
</style>
</head>
<body>
<h1>Specificity:</h1>
<p><i><b id="cyan">Specificity</b></i> means that more <b>"specific"</b>
selectors are given priority over less specific selectors.</p>
</body>
</html>
Related examples in the same category