Me dice que dar al primer input
un value
que coincida con el contenido de texto del label
, le estoy dando el mismo texto y no pasa.
<li>
<input type="radio" id="q1-a1" value="True" />
<label for="q1-a1">True<label for="q1-a1"></label></label>
</li>
<li>
<input type="radio" id="q1-a2" value="False" />
<label for="q1-a2">False<label for="q1-a2"></label></label>
</li>
<li>
<input type="radio" id="q2-a1" value="True" />
<label for="q2-a1">True<label for="q2-a1"></label></label>
</li>
<li>
<input type="radio" id="q2-a2" value="False" />
<label for="q2-a2">False<label for="q2-a2"></label></label>
</li>
Tu codigo no se esta añadiendo correctamente
utiliza el botón </>
y pega tu codigo entre las comillas triples
** Debes colocar el contenido de texto del primer label
después del elemento input
Me dice, **
<li>
<input type="radio" id="q1-a1" value="true" />
<label for="q1-a1">True</label>
</li>
<li>
<input type="radio" id="q1-a2" value="false" />
<label for="q1-a2">False</label>
</li>
<li>
<input type="radio" id="q2-a1" value="true" />
<label for="q2-a1">True</label>
</li>
<li>
<input type="radio" id="q2-a2" value="false" />
<label for="q2-a2">False</label>
</li>
codigo original:
<ul class="answers-list">
<li>
<label for="q1-a1">
<input type="radio" id="q1-a1" />
</label>
</li>
<li>
<label for="q1-a2">
<input type="radio" id="q1-a2" />
</label>
</li>
</ul>
Tu codigo
<li>
<input type="radio" id="q1-a1" value="true" />
<label for="q1-a1">True</label>
</li>
<li>
<input type="radio" id="q1-a2" value="false" />
<label for="q1-a2">False</label>
</li>
Al parecer moviste la posición de las etiquetas, no hay que moverlas, te recomiendo resetear tu código para que
las instrucciones son:
en los elementos label
tañade un texto de manera que el input
este antes del texto
A continuación, dale a los elementos input
un value
que coincida con el texto.
El texto debe ser True
o False
.
ILM
February 16, 2024, 8:30am
5
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 (').