Id and attribute

It was said that the id should be private and given to a single element, but here we have given it to the form element. form element has many children, how can you keep it private? All child elements have the same “ID”

If you haven’t solve this one yet, please send a link to the lesson :slight_smile:

Please post your actual cde instead of a picture of code. Thanks.

None of the children has any ids. Child elements do not inherit selectors.

Not sure what you mean by private? An id should be unique, meaning only one element should have the id.

You can select child elements based on a parent id as the starting point for the selector but that doesn’t mean the child element has that id.

#cat-photo-form input[type=text] {
  border: 2px solid red;
}

Challenge:

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