What you want is use the $\varepsilon$-$\delta$ definition of continuity/semi-continuity
$$
\forall \varepsilon > 0, \quad \exists \delta > 0 \quad \text{s.t.} \quad |x-x_0| < \delta \quad \Longleftrightarrow \quad |f(x) - f(x_0)| < \varepsilon.
$$
Since $|f(x) - f(x_0)| < \varepsilon$ is equivalent to $f(x_0) - \varepsilon < f(x) < f(x_0) + \varepsilon$, this statement is equivalent to
$$
\forall \varepsilon > 0, \quad \exists \delta > 0 \quad \text{s.t.} \quad |x-x_0| < \delta \quad \Longleftrightarrow \quad f(x_0) - \varepsilon < f(x) < f(x_0) + \varepsilon
$$
which means continuity is equivalent to upper and lower semi-continuity.
ADDED : I'll assume the definition of semi-continuity is the following, i.e. that the preimage of an open set of the form $\{ y \, | \, y > a \}$ is open for any upper semi-continuous function, and that the preimage of an open set of the form $\{ y \, | \, y < a \}$ is open for any lower semi-continuous function. If this is not the definition you have, let me know. I'm just guessing those definitions from the $\varepsilon$-$\delta$ definitions of continuity.
We show that continuity $\Longleftrightarrow$ upper and lower semi-continuity.
$(\Longrightarrow)$ This one is clear, since if the pre-image of any open set is open, then in particular are the pre-images of those of the form $(a, \infty)$ and $(-\infty,a)$.
$(\Longleftarrow)$ If $f^{-1}((a,\infty))$ and $f^{-1}((-\infty,b))$ are open sets, then since $f^{-1}((a,b)) = f^{-1}((a,\infty)) \cap f^{-1}((-\infty,b))$ and that the intersection of two open sets is open, then $f^{-1}((a,b))$ is open. Now any open set $\mathcal O$ in $\mathbb R$ is of the form
$$
\bigcup_{n=0}^{\infty} (a_n, b_n)
$$
where all the intervals $(a_n,b_n)$ are pairwise disjoint and $a_n \in \mathbb R \cup \{-\infty\}$, $b_n \in \mathbb R \cup \{\infty\}$. But
$$
f^{-1} \left( \bigcup_{i \in I} \mathcal O_i\right) = \bigcup_{i \in I} f^{-1} (\mathcal O_i)
$$
for any collection of sets indexed by any set $I$ (prove this trivially by the definition of pre-images and show $\subseteq$/$\supseteq$), thus,
$$
f^{-1}(\mathcal O) = \bigcup_{n=0}^{\infty} f^{-1}((a_n,b_n))
$$
which is an open set.
Hope that helps,
The topology on a subspace $(Y, \mathfrak{N})$ of a metric space $(X, \mathfrak{M})$ is formed by all the intersections of each open sets of $(X, \mathfrak{M})$ with $Y$ as subset.
I'll prove that the restriction of a continuous function to a subspace is still continuous (it may happen the converse, that the restriction of a non-continuous function happens to be continuous - it's always the case when the subspace is discrete for instance).
Take $f:X\to Z$ a continuous function, and $Y$ a subspace of $X$. The preimage by $f$ of an open set $B\subseteq Z$ is an open $A\subseteq X$. Let $f'$ be the restriction of $f$ on $Y$ (sometimes indicated by $f|_Y$). The preimage of $B$ by $f'$ is by definition the set of points $y\in Y$ for which $f(y)\in B$, which is exactly $A\cap Y$, which by the definition of the subspace topology is open. $\qed$
Your example function is clearly continuous from $ℝ$ to $ℝ$ — the identity is always continuous — so all restrictions of it on any subspace are continuous too.
As @PrahladVaidyanathan correctly says, the confusion comes from forgetting that a space is always open in itself.
Best Answer
You've just got your images and inverse images muddled. $f^{−1}(\enspace(−1,1)\enspace)=f^{−1}(\enspace[0,1)\enspace)=(−1,1)$, whereas $f(\enspace(−1,1)\enspace)=[0,1)$. So the inverse image of $(−1,1)$ is an open set in $\mathbb{R}$, as you'd expect. Easy mistake to make!
(Now in answer format, by popular demand.)