Survey Form - Build a Survey Form

Hello,
my issue is following apparently I don’t have all of these even though I thought I do:

  • You should have an input element with an id of email.

  • Failed:Your #email should have a type of email.

  • Failed:Your #email should require input.

Your #email-label should contain text that describes the input.

You should have a label element with an id of email-label .

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang='eng'>
  <head>
    <h1 id='title'>Page</h1>
  </head>
  <body>
    <p id='description'>This is my description</p>
  </body>
  <form id='survey-form'>
    <label for='name' id='name-label'><input required id='name' type='text'>Enter name</input></label>
    <label for='email' id='email'>Enter email<input id='email' required type='email'></label>
    <label id='number-label' for='number'> Enter age<input id='number' min='18' max='60' type='number'></label>
  </form>
  </html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15

Challenge Information:

Survey Form - Build a Survey Form

The problem is that your email input’s label should have the id id="email-label". If you fix that you should be okay.

Keep it up! Your on your first certification project now. It won’t be long until you on your last!

Thank you very much!!!

Also There are a few errors in your HTML code:

  1. The <h1> and <p> tags should be within the <body> tag, not inside the <head> tag.
  2. The <input> element does not have closing tags. Instead, it should be self-closing (e.g., <input ... />).
  3. You have duplicate id attributes (id='email') for the <label> and <input> elements. IDs should be unique within the document.
  4. The language attribute in the <html> tag is misspelled; it should be lang='en' instead of lang='eng'.
  5. The <label> elements should have their for attribute matching the id of the associated input element. Currently, the for attribute of the labels for name and email inputs are missing.
  6. The text content inside the <input> element (e.g., “Enter name”) should be moved to the associated <label> element.

And you need link element to link your html file to css.

Also meta element for different screen sizes.

Your all form should be between the body tags.

Hi, this is my first post.
I’m trying to improve the look of my survey form by adding a background image, but I can’t figure out how to make Google images or images from my computer work in the code.
What should an src link look like to be valid in the project?

Welcome to FFC forum.
To use an image as a background in your survey form, you need to provide the correct source (src) link to the image in your HTML code. If you’re using an image from Google Images or from your computer, you’ll need to make sure the image is hosted online and accessible via a URL.

Here’s an example of what the src attribute should look like in your HTML code:

<img src="https://example.com/image.jpg" alt="Description of the image">

Replace "https://example.com/image.jpg" with the actual URL of your image. If you’re using an image from your computer, you’ll need to upload it to a web server or use a file hosting service that provides a direct link to the image. Once you have the URL, you can use it in the src attribute.

Make sure to replace "Description of the image" with a brief description of the image for accessibility purposes.

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