boolean (final String presentation, final String tagName) { // "head", "head#id", "head.cls" final String lowerCased = StringUtil.toLowerCase(presentation); return lowerCased.startsWith(tagName) && (lowerCased.length() == tagName.length() || !Character.isLetter(lowerCased.charAt(tagName.length()))); }