Change the tag of this element. For example, convert a {@code <span>} to a {@code <div>} with
{@code el.tagName("div");}.

@param tagName new tag name for this element
@return this element, for chaining
773498
public Element tagName(String tagName) {
        Validate.notEmpty(tagName, "Tag name must not be empty.");
        tag = Tag.valueOf(tagName, NodeUtils.parser(this).settings()); // maintains the case option of the original parse
        return this;
    }
1345901
@Deprecated
	public static Tag getTag(Channel channel, String tagName) {
		Collection<Tag> tag = Collections2.filter(channel.getTags(),
				new TagNamePredicate(tagName));
		if (tag.size() == 1)
			return tag.iterator().next();
		else
			return null;
	}
929610
public function removeTagsByName($tagName)
    {
        $this->tags = array_filter(
            $this->tags,
            function (TagInterface $tag) use ($tagName) {
                return $tag->getTagName() !== $tagName;
            }
        );
    }
378075
public <T extends Tag> T remove(String tagName) {
        return (T) this.value.remove(tagName);
    }
985673
public Tag getOrCreateTag(String tagName, boolean isRef)
    {
        if (null == tagName)
            throw new IllegalArgumentException("Looking for a null tag name.");
        tagName = Tag.normalizeName(tagName);

        synchronized (this.definedTags)
        {
            if (definedTags.containsKey(tagName))
                return definedTags.get(tagName);
            else
            {
                final Tag tag = new Tag(tagName);
                definedTags.put(tagName, tag);
                return tag;
            }
        }
    }
449298
public void setTag(String tagName, short tagValue) {
    tagTable.put(tagName, Short.valueOf(tagValue));
  }
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
626963
public Node<T> add(T element) {
		Node<T> node = new Node<>(this, element);
		nodes.add(node);
		return node;
	}
1307830
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setTag(final String tag) {
        pathBuilder.setTag(tag);
        return (T) this;
    }
368746
public static Element appendElement(Element parent, String tagName) {
        Element child = parent.getOwnerDocument().createElement(tagName);
        parent.appendChild(child);
        return child;
    }
1100072
public static List<Element> getElements(Element element, String tagName) {
		final NodeList nodeList = StrUtil.isBlank(tagName) ? element.getChildNodes() : element.getElementsByTagName(tagName);
		return transElements(element, nodeList);
	}
107692
function createElement(tagName) {
  return function (...args) {
    const element  = document.createElement(tagName);
    const attrs    = isObject(args[0]) ? args[0] : {};
    const children = args.length === 2 ? args[1] : args[0];

    Object
      .keys(attrs)
      .forEach(name => element.setAttribute(name, attrs[name]));

    if (Array.isArray(children)) {
      children.forEach(node => append(element, node));
    }

    if (isString(children) && !isVoidElement(tagName.toLowerCase())) {
      append(element, children);
    }

    return element;
  };
}
1008039
public Tag findTag(String tagName)
    {
        if (null == tagName)
            throw new IllegalArgumentException("Looking for null tag name.");
        return definedTags.get(Tag.normalizeName(tagName));
    }
1004816
public static org.w3c.dom.Element convertElement(Element element) {
        return NodeAdaptors.getElement(element);
    }
1197428
protected static Element getChildElement(final Element parent, final String tagName) {
        List<Element> elements = getElements(parent, tagName);
        if (elements.size() > 0) {
            return elements.get(0);
        } else {
            return null;
        }
    }
878397
@SuppressWarnings("unchecked")
    private <T extends DomElement> List<T> allByTagName(String tagName) {
        return (List<T>) htmlPage.getElementsByTagName(tagName);
    }
264733
public void setTag(String tagName, String tagValue) {
    if (tagValue == null) {
      tagValue = "";
    }
    tagTable.put(tagName, tagValue);
  }