Form a story: why are we adding the span tag in step 12

I am doing the Form a Story project on the HTML course. In step 12 it says to add a <span> tag before I can add the radio buttons. I don’t understand why it has to be there. In the previous lesson on Forms I can see in the code that there is also a <span> tag before the radio buttons but it doesn’t mention in the lesson text why it is there.

Link to the Form a Story exercise

Link to the Forms lesson

The span there is merely used to ask the question inline with the radio buttons. It is not necessary for the radio buttons to work. But it would be nice to know what question you are answering to :wink: .

<span> Have you ever tried coding in HTML?</span>
<input id="yes" type="radio" name="answer" value="yes" required>
<label for="yes">Yes</label>
<input id="no" type="radio" name="answer" value="no" required>
<label for="no">No</label>

Aha! Thank you. That makes perfect sense.
The questions is literally “Yes or No” :smiley: It’s inserted into a story later to answer a “do you even get anywhere?” question. Animals mocking each other :crazy_face:


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