Tell us what’s happening:
Describe your issue in detail here.
Your code so far
what is the right code to step 28
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
<form method="post" action='https://register-demo.freecodecamp.org'>
<fieldset>
<label for="first-name">Enter Your First Name: <input id="first-name" type="text" required /></label>
<label for="last-name">Enter Your Last Name: <input id="last-name" type="text" required /></label>
<label for="email">Enter Your Email: <input id="email" type="email" required /></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<!-- User Editable Region -->
<fieldset>
<label><input type="radio" name="personal-business" value="personal-account"/> Personal Account</label>
<label><input type="radio" name="personal-business" value="business-account" /> Business Account</label>
<label><input type="checkbox" required /> I accept the terms and conditions</label>
</fieldset>
<!-- User Editable Region -->
<fieldset></fieldset>
<input type="submit" value="Submit" />
</form>
</body>
</html>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
}
label {
display: block;
margin: 0.5rem 0;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge: Learn HTML Forms by Building a Registration Form - Step 28
Link to the challenge:
hbar1st
February 10, 2023, 3:34pm
2
the instructions were
To relate the radio inputs, give them the same name
attribute with a value of account-type
.
Did you give each radio button the same value account-type
in the name attribute as requested?
my code was:
<input type="radio" name="personal-business" value="personal"/>
<input type="radio" name="personal-business" values="business" />
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
carlos.haro:
name="personal-business"
This doesn’t look like the value you were asked to use
Right, and thats not what the instructions said to do:
To relate the radio inputs, give them the same name
attribute with a value of account-type
You must use the value account-type
. Any other value is wrong.
Hi Jeremy, thank for your reply, but since i’m new in this world, I have to say that I’m kind of lost in this , could you please help the blind, by now, i will appreciate it
carlos.haro:
name=“personal-business”
This uses the value personal-business
personal-business
is not how you spell account-type
same “name” attribute means: “radio”
with a value of “account-type” means: “personal-business” or “personal-radio” or none of them
No, that is not what the instructions mean.
This means that you must use account-type
as the value of the name
attribute. If you use any other value for the name
attribute, then your code is wrong.
You must not use personal-business
or personal-radio
or any other value.
hi Jeremy, sorry for my dumbness,
so, the name should be name=“radio” value=“account-type” >
No, that creates a name
attribute with a value of radio
and a value
attribute with a value of account-type
.
HTML (HyperText Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables. As the title suggests,...
Elements can also have attributes that look like the following:
Attributes contain extra information about the element that you don’t want to appear in the actual content. Here, class
is the attribute name and editor-note
is the attribute value .
system
Closed
August 12, 2023, 5:08am
14
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.