Survey Form - Build a Survey Form

Tell us what’s happening:
How can I make a new line for each form element

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<h1 id="title">Survey Form</h1>
<p id="description">A quick form to help improve the platform</p>
<form id="survey-form">First name:<input id="name" required></input>
Enter Email:<input id="email" type="email" required></input>
Age:<input id="number" type="number" min="13" max="120"
</form>
/* file: styles.css */

Your browser information:

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

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

you will need to write some css to lay out the input fields the way you want them to be

1 Like

I would recommend you wrap each input and its associated text in an element. If you wrapped them in a div then they would automatically be on separate lines since divs are block level elements. But you also need to associate the text with the input, so you could wrap them in a label element to solve that issue and then use CSS to set their display type to block.

1 Like

Thank you so much! Very helpful

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