No, a line perpendicular to a horizontal line would not have a slope of 0. It would have an undefined slope.
In Mathematics and Geometry, perpendicular lines refers to two (2) lines that intersect or meet each other at an angle of 90° (right angles).
In Mathematics and Geometry, a condition that is true for two lines to be perpendicular is given by:

Generally speaking, a line that is perpendicular to a horizontal line would not have a slope of 0. Instead, it would have an undefined slope because the line perpendicular to it would be a vertical line and all vertical lines have an undefined slope since the rate of change on the x-axis is zero (0).
Complete Question:
Would a line perpendicular to a horizontal line have a slope of 0?