Which elements must have IDs when we want to remove one element from inside another?

The parent element and the child elementOnly the child element

The parent element and the child element.