public boolean equals(Object o) {
        if (o instanceof HtmlTag) {
            HtmlTag other = (HtmlTag) o;
            return element.equals(other.element) && isOpenTag == other.isOpenTag;
        } else {
            return false;
        }
    }