We give an introduction to the theory of weak Hopf algebras proposed as a coassociative alternative of weak quasi-Hopf algebras. We follow an axiomatic approach keeping as close as possible to the “classical” theory of Hopf algebras. The emphasis is put on the new structure related to the presence of canonical subalgebras AL and AR in any weak Hopf algebra A that play the role of non-commutative numbers in many respects. A theory of integrals is developed in which we show how the algebraic properties of A, such as the Frobenius property, or semisimplicity, or innerness of the square of the antipode, are related to the existence of non-degenerate, normalized, or Haar integrals. In case of C*-weak Hopf algebras we prove the existence of a unique Haar measure h∈A and of a canonical grouplike element g∈A implementing the square of the antipode and factorizing into left and right elements g=gLg−1R, gL∈AL, gR∈AR. Further discussion of the C*-case will be presented in Part II.