Tell us what’s happening:
The radio buttons are aligned horizontally instead of vertically and i assume the default is vertical. I’m checking the code below from w3school and just by copy pasting i get the radio buttons aligned vertically so i dont know what’s wrong with my code or why would it display the radio buttons horizontally.
"""
<!DOCTYPE html>
<html>
<body>
<h1>Display Radio Buttons</h1>
<form action="/action_page.php">
<p>Please select your gender:</p>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="radio" id="other" name="gender" value="other">
<label for="other">Other</label>
<br>
<p>Please select your age:</p>
<input type="radio" id="age1" name="age" value="30">
<label for="age1">0 - 30</label><br>
<input type="radio" id="age2" name="age" value="60">
<label for="age2">31 - 60</label><br>
<input type="radio" id="age3" name="age" value="100">
<label for="age3">61 - 100</label><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
**Your code so far**
<!DOCTYPE html>
<html lang ="en">
<head>
<meta charset="UTF-8">
<style>
</style>
</head>
<body>
<div>
<h1 id="title">freeCodeCamp Survey Form</h1>
<p id="description">Thank you for taking the time to help us improve the platform</p>
<form id="survey-form">
<div>
<label id="name-label" for="name">Name</label>
<input type="text" name="name" id="name" placeholder="Enter your name" required>
</div>
<div>
<label id="email-label" for="email">Email</label>
<input type="email" name="email" id="email" placeholder="Enter your email" required>
</div>
<div>
<label id="number-label" for="number">Age</label>
<input type="number" name="number" id="number" min="10" max="99" placeholder="Age">
</div>
<div>
<label for="role">Role</label>
<select id="dropdown">
<option value="student">Student</option>
<option value="job">Full-Time Job</option>
<option value="other">Other</option>
</select>
</div>
<div>
<p>Would you recommend freeCodeCamp to a friend?</p>
<input type="radio" name="group" value="definitely" checked>
<label>Definitely</label>
<input type="radio" name="group" value="maybe">
<label>Maybe</label>
<input type="radio" name="group" value="not-sure">
<label>Not Sure</label>
</div>
</form>
</div>
<script src="https://static.codepen.io/assets/common/stopExecutionOnTimeout-157cd5b220a5c80d4ff8e0e70ac069bffd87a61252088146915e8726e5d9f147.js"></script>
<script src='https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script>
<script id="rendered-js">
// coded by @lasjorg
// eslint-disable-next-line no-unused-vars
const projectName = 'survey-form';
//# sourceURL=pen.js
</script>
</body>
</html>
"""
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
.
Challenge: Build a Survey Form
Link to the challenge: