code: boolean canContain(Tag parent, Tag child) {
      Validate.notNull(child);
  
      if (child.isBlock() && !parent.canContainBlock())
        return false;
  
      if (!child.isBlock() && parent.isData())
        return false;
  
      if (closingOptional.contains(parent.getName()) && parent.getName().equals(child.getName()))
        return false;
  
      if (parent.isEmpty() || parent.isData())
        return false;
  
      // head can only contain a few. if more than head in here, modify to have a list of valids
      // TODO: (could solve this with walk for ancestor)
      if (parent.getName().equals("head")) {
        if (headTags.contains(child.getName()))
          return true;
        else
          return false;
      }
  
      // dt and dd (in dl)
      if (parent.getName().equals("dt") && child.getName().equals("dd"))
        return false;
      if (parent.getName().equals("dd") && child.getName().equals("dt"))
        return false;
  
      return true;
    }
docs: Test if this tag, the prospective parent, can accept the proposed child.
  
  @param child potential child tag.
  @return true if this can contain child.