Step 56 como asociar texto Loving con checkbox

Esto me pide lo que tengo que hacer : There’s another way to associate an input element’s text with the element itself. You can nest the text within a label element and add a for attribute with the same value as the input element’s id attribute.

Associate the text Loving with the checkbox by only nesting the text Loving in a label element and place it to the right side of the checkbox input element.

y esto es lo que hice: <input id="loving" type="checkbox"><label for="loving"> </label> Loving</input>

Sin embargo me sale este error: The text Loving should no longer be located directly to the right of your checkbox. It should be wrapped in a label element. Make sure there is a space between the two elements
No entiendo cual es el error, alguien me podria ayudar por favor?

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

cual es el link del reto?

Te recomiendo repasar los pasos anteriores.

el elemento input no utiliza etiqueta de cierre y las instrucciones dicen que el texto debe estar dentro de las etiquetas label

como así ? me sigue dando error

<label for="loving"><input id="loving" type="checkbox"> Loving</label>

Casi.
Intrucciones.

  • El input no debe estar dentro del elemento label
  • El elemento label debe estar a la derecha del elemento input separado por un espacio
  • Al texto "Loving " no le añadas espacios.
  • Asociar el elemento label con el input (esto está bien echo)

me podrias mostrar en codigo por favor?

la plataforma no permite añadir las respuestas a los ejercicios.

solo saca el input y ponlo a la derecha del label separado por un espacio y el texto loving no debe tener espacios

Muchas Gracias funciono!!

Cómo es? Estoy trabado acá hace dos horas y ni leyendo acá pude solucionarlo

Hola!!
A mi me costó bastante también… pero es simplemente añadir un elemento a continuación del input que ya está escrito. el label, con el for= al id del input.

1 Like

Loving

Hola, pudieras orientarme?

Hola, podrías orientarme?

If you have a question about a specific challenge as it relates to your written code for that challenge, and you’ve tried to solve it at least 3 times so far and still need some help, just click the Ask for Help button located on the challenge (it looks like a question mark).
This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.