parse markup tags inside of an element, returning indexes, tagName, and specified attributes