I was going through some introductory algebraic topology. The book I am reading says that:

If there is a homotopy $H: X\times I \rightarrow Y$ where $I = [0,1]$, then for each $t \in I$, there is a continuous map $h\_t: X\rightarrow Y$ defined by

$$h\_t(x) = H(x,t) \text{for all } x \in X$$

Now I was wondering how to show that this $h\_t$ is continuous.

I know that $H$ is continuous by the definition of homotopy.

To prove $h\_t$ is continuous, I will have to show that for each open set $U$ in $Y$, $h\_t^{-1}(U)$ is open in $X$.

How can I show that or is there any other method?

Please, help