I can't get the checked attribute to work

Tell us what’s happening:
I put the checked attribute as the last attribute in the input tag, but it keeps telling me I am not supposed to alter the inner text of the label tag. I’m just adding the attribute to the input tag though. What’s going on?

  **Your code so far**
      <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" value="indoor" checked> Indoor</label>

<label for="loving"><input id="loving" type="checkbox" name="personality" value="loving" checked> Loving</label>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15

Challenge: Check Radio Buttons and Checkboxes by Default

Link to the challenge:

I’ve edited your post 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 (’).

1 Like

you were supposed to add checked in appropriate positions and not to remove the boilerplate markup given to you

Thank you. I will try what you have suggested.

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