We present an analytical theory of domain wall tilt due to a transverse in-plane magnetic field in a ferromagnetic nanostrip with out-of-plane anisotropy and Dzyaloshinskii-Moriya interaction (DMI). The theory treats the domain walls as one-dimensional objects with orientation-dependent energy, which interact with the sample edges. We show that under an applied field the domain wall remains straight, but tilts at an angle to the direction of the magnetic field that is proportional to the field strength for moderate fields and sufficiently strong DMI. Furthermore, we obtain a nonlinear dependence of the tilt angle on the applied field at weaker DMI. Our analytical results are corroborated by micromagnetic simulations.