The elemental composition of herbal infusions and teas has not been sufficiently investigated. It could potentially be used for defining fingerprints for individual herbal / tea infusions, differentiation of botanical families, detecting the influence of packaging, and other purposes. The objective of this study was to determine the elemental composition, including the trace element content, of various herbal infusions and teas by means of total reflection X-ray fluorescence analysis (TXRF), with a chemometrics approach using principal component analysis (PCA). This study determined the elemental composition of various herbal infusions and teas, including trace elements, using total reflection X-ray fluorescence (TXRF). The methodology for the sample preparation was established, including the multiple-steepings procedure for the two tea samples (Oolong and Pu-erh). Data from 29 samples were collected. We hypothesized that the elemental content of infusions could reflect certain features, such as the influence of processing and the type of tea. A chemometric approach (PCA) was applied, and differences between teas and herbal infusions were found. This was further corroborated by explicit differentiation of one botanical family, Theaceae. The influence of packaging (tea bags) on herbal material was identified. The three types of tea (Camellia sinensis) appeared to be separated with PCA, and elemental concentrations in Pu-erh changed with multiple steepings. © 2020 The Authors. Journal of The Science of Food and Agriculture published by John Wiley & Sons Ltd on behalf of Society of Chemical Industry.