from typing import List
from typing import Tuple


def getElementByClass(className: str, fileName: str) -> List[Tuple[int, str]]:
    """Returns first matching tag from an HTML/XML document"""
    nonN: List[str] = []
    with open(fileName, "r+") as f:
        html: List[str] = f.readlines()
        for line in html:
            nonN.append(line.replace("\n", ""))

    pattern: str = f'class="{className}"'
    patternAlt: str = f"class='{className}'"

    matches: List[Tuple[int, str]] = []

    for line in nonN:
        if pattern in line or patternAlt in line:
            lineNo = nonN.index(line) + 1
            matches.append((int(lineNo), line))
            break
    return matches