First matches the children specified opened or self-closed tags and their contents. If not found, matches opening tag. If not found, matches closing tag.