Topological semimetals, including topological nodal point semimetals (TNPSs), topological nodal line state semimetals (TNLSs), and topological nodal surface semimetals (TNSSs), featuring zero-dimensional (0D), one-dimensional (1D), and two-dimensional (2D) topological elements (TEs), respectively, have attracted widespread attention in recent years. In this work, based on first-principles calculations, we propose for the first time that three different (0D, 1D, and 2D) TEs are simultaneously present in a synthetic compound, HfIr3B4, with a P63/m type structure. In detail, HfIr3B4 hosts a Dirac point (DP) state at the K point, a TNL state in the kz = 0 plane, and a 2D TNS state in the kz = π plane, respectively. All sorts of topological elements, 0D, 1D, and 2D TEs, coexisting in the P63/m type HfIr3B4, provide an ideal platform to study the rich fermionic states and their related physical properties in this type of compound. In addition, because the 0D, 1D, and 2D TEs of HfIr3B4 are equally distributed in different energy ranges relative to the Fermi level, an approach is proposed to utilize individual TEs to build on-demand devices.