We apply, in the context of semigroups, the main theorem from the authors’ paper “Algebras defined by equations” (Higgins and Jackson in J Algebra 555:131–156, 2020) that an elementary class C of algebras which is closed under the taking of direct products and homomorphic images is defined by systems of equations. We prove a dual to the Birkhoff theorem in that if the class is also closed under the taking of containing semigroups, some basis of equations of C is free of the ∀ quantifier. We also observe the decidability of the class of equation systems satisfied by semigroups, via a link to systems of rationally constrained equations on free semigroups. Examples are given of EHP-classes for which neither (∀ ⋯) (∃ ⋯) equation systems nor (∃ ⋯) (∀ ⋯) systems suffice.