Which variable is for the equation of the horizontal line and which variable is for the equation of the vertical line?

Any vertical line has the form x = c, where c is a constant and c is the x value of any point on the vertical line

Any horizontal line has the form y = k, where k is a constant and k is the y value of any point on the horizontal line