referencing an id css code example
Example 1: how to call an id in css
<style>
#selector {
color: red;
}
/* # is id selector */
</style>
<div id="selector">
<p>This is an id</p>
</div>
Example 2: . and # in css
<!DOCTYPE html>
<html>
<head>
<style>
.classname {
background-color: green;
color: white;
}
#idname {
background-color: pink;
color: white;
}
</style>
</head>
<body>
<div class="classname">I am green colour<div>
<div id="idname">I am pink colour</div>
</body>
</html>