Prove that f is uniformly continuous on [1,2] by assuming the fact that f is continuous on (0,inf).

Since f is continuous (0, inf) then f is continuous on [1,2]. Then by theorem, If f is continuous on a closed interval [1,2], then f is unifromly continuous on [1,2].

I was just wondering how I can justify that if f is continuous on (0, inf) then f is continuous on [1,2]. It seems obvious just I don't know how it should be formally. Like a restriction of a continuous function is continuous.

Thanks