checked is not a valid html element name. checked is an attribute, to check a radio or checkbox by default you can add checked inside the opening tag of that input element
In order to make a checkbox checked or radio button selected by default, you need to add the checked attribute to it. There's no need to set a value to the checked attribute. Instead, just add the word checked to the input element, making sure there is space between it and other attributes.
Make the first radio button and the first checkbox selected by default.
checked as @ILM said is an attribute. So let’s start there. What’s an attribute?
You have other examples of it, already in
id="indoor" is an attribute to the element input. type="radio" is an attribute to the same element input.
What is required then? It is asking to add a new attribute named checked which it will not have a value set to it, not like the examples and that it has to be inside an element named input. Which one? It says:
Make the first radio button and the first checkbox selected by default.
you need to add an attribute named “checked” to the first 2 radio buttons. An attribute is written inside the element tag. like <p class=“” id=“”>
What you wrote means an attribute named name with the value checked.
Just checked without a value. Just the word alone, inside the element where the first radio bottom is.
If I were to give you the whole code, I will be doing you a disservice and preventing you from learn it. It is the effort what it makes you learn and understand.
Be patient and go through the message again if you must. Try again and post what you try.
To make the first radio button and the first checkbox selected by default, you need to add the checked attribute to the respective input elements. Here is the modified code:
Is your cat an indoor or outdoor cat?
Indoor
Outdoor
What's your cat's personality?
Loving
Lazy
Energetic
In this updated code, the checked attribute has been added to the first radio button (id="indoor") and the first checkbox (id="loving"), making them selected by default.
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.