Stuck on adding id to H1 element

Hello there. I am trying to build the certification survey form. I have gotten check marks on all the tasks except this one, and I can’t figure out why: “You should have an h1 element with an id of title.”
My code for that section:

  <h1 id="title"> Survey </h1>

I’m sure it’s something very obvious that I am overlooking. Or maybe it’s wrong, all wrong. :slight_smile:
Thank you in advance.

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

Challenge: Build a Survey Form

Link to the challenge:

hello and welcome to fcc forum :slight_smile:

i used your provided snippet, and it gives me no error, share your full code maybe it’s something else, thanks

Remove the spaces around the h1 text.

Hello, thank you for your response!
Okay, here is my full code:

<!DOCTYPE html>
  <title id="title"> Survey </title>
  <link rel="stylesheet" href="styles.css">
<h1 id="title">Survey</h1>
<h2>Help us help you</h2>
<p id="description">This is a survey to survey our perfomance. Thank you for your participation.</p>
<form id="survey-form">
  <input id="name" type="text" required placeholder="Enter your name" required><label id="name-label"/> Enter your name</input>
  <input id="email" type="email" required placeholder="Enter valid email" required><label id="email-label"/> Enter your email</input> 
  <input id="number" type="number" min="1" max="30" required placeholder="Enter your name"><label id="number-label"/> Enter your number</input>
  <p>Please choose one below:</p>
  <select id="dropdown" class="dropdown">
    <option value="option 1" >Option 1</option>
    <option value="option 2">Option 2</option>
  <p>Would you say that Option 1 is more important to you, or option 2?</p> 
  <input type="radio" name="radio buttons" value="radio buttons"> Option 1</input>
  <input type="radio" name="radio buttons" value="radio buttons">Option 2</input>
  <p>Would you say... Please check all that apply:</p>
  <input type="checkbox" value="checkbox 1">This</input>
  <input type="checkbox" value="checkbox 2">This 2</input>
  <input type="checkbox" value="checkbox 3">This 3</input>
  <input type="checkbox" value="checkbox 4">This 4</input>
  <input type="checkbox" value="checkbox 5">This 5</input>
  <textarea class="textarea">Any additional comments?</textarea>
  <input type="Submit" id="submit" class="submit"></input>


<footer class="footer">Thank you for your time!</footer>

Hello there. Thank you for your response. I’ve tried what you’ve suggested, and it still won’t work. :confused: I’ve provided my full code in a reply above, in case there’s something there.

Remove the id of the title here. The test was confused, you can’t have multiple ids with the same name.

You can only have one unique id on a webpage but you have about 2 elements with the same “title” as id, it won’t work.

i used your “code snippet” and excluded anything that is not within “body” tag, and passes in flying colors!! i will say you do that same, just put in all the code from “body” tag and try again, this should be fine :slight_smile:

Ah, this is it! Thank you. I did not know you could only have one id with a certain name. I will keep that in mind for the future.

Thank you, this was indeed the problem. I did not know you couldn’t have two elements with the same id. That is good to know. Thanks.

Hi there. Thank you. It was also suggested that I eliminate one id with “title”, as I had two elements with that id. Then the code passed. Thank you for your help. :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.