If a line has no y-intercept then it is vertical.
If a line has no x-intercept then it is horizontal.
Then if the equation of a line is:
y = mx + c ,
where m = gradient (i.e. the slope of the line) and c = y-intercept.
Then when there is no x-intercept the gradient, m, is equal to zero.