Learn Accessibility by Building a Quiz - Step 8

Tell us what’s happening:
Describe your issue in detail here.

Hello! I have the solution to this step, I’m just having trouble understanding it. Why, in this case, are we putting # in front of the selector as opposed to .? Thank you!

   **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
 <head>
   <meta charset="UTF-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
   <title>Accessibility Quiz</title>
   <link rel="stylesheet" href="styles.css" />
 </head>
 <body>
   <header>
     <img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
     <h1>HTML/CSS Quiz</h1>
     <nav></nav>
   </header>
   <main></main>
 </body>
</html>

/* file: styles.css */
body {
	background: #f5f6f7;
	color: #1b1b32;
	font-family: Helvetica;
	margin: 0;
}



   **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn Accessibility by Building a Quiz - Step 8

Link to the challenge:

Hello, welcome to the forum.

The # symbol is used for selecting elements who have a given id value.
The . is for selecting by class.

(So if you want to select an element that has an id attribute defined, use the #)

That was an extremely helpful explanation, thank you very much :slight_smile: