Unable to complete step 5 of Survey Form project

In the survey form project, user story 5 required that the email input must have an attribute of type=“email” and required but even if my input consists of those attributes, the script doesn’t recognize that those attributes are present.

My code so far:


<!DOCTYPE html>

        <title>OS survey</title>
        <link rel="stylesheet" href="surveystyle.css">
    <div id="script">
        <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
    <main id="main">
        <div class="title-section">
            <h1 id="title">macOS vs. Windows</h1>
            <p id="description">Thank you for helping us decide which platform to focus on</p>
        <div id="surveyform">
            <form id="survey-form">
                <input id="name" class="input-text" type="text" placeholder="Name*" required/>
                <label id="email">E-Mail</label>
                <input id="email" class="input-text" type="email" placeholder="E-Mail Address*" required/>
                <input id="age" class="input-text" type="number" placeholder="Enter your name here" required/>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
    font-family: 'Roboto', sans-serif;
@media (max-width: 699px){
        max-width: 600px;
    text-align: center;
    color: white;
    margin-top: 3em;
    height: 100%;
    background: linear-gradient(135deg, purple, pink);
    max-height: 100%;
#survey-form .input-text{
    display: block;
    justify-content: center;
    background-color: #fff;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    padding-top: 10px;
    padding-bottom: 35px;
    padding-left: 2em;
    padding-right: 2.5em;
    max-width: 700px;
    margin: 50px auto 0 auto;
    border-radius: 5px;
    padding-top: 30px;
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-left: 1em;
    margin-right: 1em;
    font-size: 15px;
    border: hidden;
    border-bottom: 2px solid;
    margin: 10px auto 30px auto;
    outline: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid purple;

Anything I’m doing wrong?

Link to challenge:

you have more than one element with id="email", be sure to have only one, and that is the correct one

1 Like