Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Change to HTML Forms Challenge

"Add a line break element after each shirt-size label element" Should be changed to "Add a line break element before each shirt-size label element"

This is Challenge task 5 of 5, of Stage 3 on the HTML Forms course.

Tagging Nick Pettit on this one

Thanks James

3 Answers

Hey Jason,

the current instructions for the challenge creates this situation:

<This is a line of code>*Small<br>

*Medium<br>

*Large<br>

This was my quick thinking for a better layout

<This is a line of code>

<br>*Small

<br>*Medium

<br>*Large

Hope this helps.

+1 Jason Anello Sorry for the confusion! Keep up the good work

EDIT: "Add a line break element after each shirt-size label element" Should be changed to "Add a line break element before each Radio Button"

In your second example there, don't you have line breaks after the labels?

In your question you suggested that the wording should be changed to add line breaks before each shirt size label but you have the line breaks after the labels.

Hi Teame,

To me it seems like the instructions are correct. I think the intent is to have a radio button followed by a label. Then a line break before the next pair.

The labels are after the radio inputs so if you put a line break before the label then it won't be on the same line as the radio input it belongs to unless I'm misunderstanding what you're saying.

The line breaks are a way to create listed items i.e. shirt-size labels, but to do so the line break tags would have to be written before each shirt-size labels. This allows for a very clean and easy to read list in html.

I'm sorry, but I'm still not getting it. Could you explain it better with an example so that if Nick does need to address this he'll have a better understanding of the problem? I thought everything was fine and I don't recall anyone else bringing up this issue.

It's my understanding that the html should be like this: (I'll use an asterisk to represent a radio button)

* Small  
* Medium  
* Large

It seems like a line break after the label is what would be needed to achieve that.

If you put the line break before the label then I think you would get something like this:

*  
Small *  
Medium *  
Large

Which seems pretty confusing to fill out.

I was able to complete the challenge with this bit of code.

        <label>Shirt Size:</label>
        <input type="radio" name="shirt_size" id="small" value="small" />
        <label for="small">Small</label>
        <br>
        <input type="radio" name="shirt_size" id="medium" value="medium" />
        <label for="medium">Medium</label>
        <br>
        <input type="radio" name="shirt_size" id="large" value="large" />
        <label for="large">Large</label>
        <br>

Hope this helps!