Elementary Algebra

Slope is defined as the $\frac{\text{change in}\:y}{\text{change in}\:x}$. If a line is horizontal, that means that its $y$ value is constant. When we go to calculate slope, we have a $0$ in the numerator, which makes the slope $0$.