For a continuous function $f: X \to Y$, the preimage of every closed set in $Y$ is closed in $X$.
Let $g: (0,1) \to [0,1]$ be a continuous surjection.
Isn't the preimage of $[0,1]$ = $(0,1)$ open?
For a continuous function $f: X \to Y$, the preimage of every closed set in $Y$ is closed in $X$.
Let $g: (0,1) \to [0,1]$ be a continuous surjection.
Isn't the preimage of $[0,1]$ = $(0,1)$ open?
As Matt points out, it is closed, as it is the whole space.
"Closed and bounded" is not the same as compact in general. Observe (for example) that $\mathcal{U}=\bigl\{(1/n,1-1/n):n\in\Bbb Z,n>2\bigr\}$ is an open cover of $(0,1)$, but has no finite subcover. Thus, you're right--such a $g$ cannot be continuous.