The range of a continuous function on the order topology is convex Let $(W, \leq)$ be a linear order, and let $f : [0, 1] \rightarrow W$ be a continuous function (where [0, 1] has the usual topology and W has its order topology). Show that the range of f is convex.

Let $Y \subseteq X$. The subspace $Y$ is a convex set if for each pair of points $a, b \in Y$ such that $a < b$, the interval $(a, b) = \{x ∈ X : a < x < b\}$ is contained in $Y$. That is, $Y$ is convex if and only if for all $a, b$ in $Y$, $a < b$ implies $(a, b) \subseteq Y$.

I'm really stuck on this question, I tried showing that suppose $f(x), f(y)$ are in W s.t $f(x) < f(y)$ and the interval $(f(x), f(y))$ contains a $w \in W$ s.t there exists no $a$ in $[0, 1]; f(a) = w $ Since f is continuous the preimage (x,y) of the set $(f(x), f(y))$ is open, Since W is a linear order $f(x) < w < f(y)$  The fact that the preimage of w is not in (x,y) implies that (x,y) is not open, but since there are no non-trivial clopen sets in [0,1] with the usual topology this gives us a contradiction.
I don't know if this makes much sense, I would appreciate feedback and more detail and explanation of convexity and topologies. What is the significance of W being a linear order, why does it matter that [0,1] have the usual topology?
Thank you!
 A: We need of the topology of $[0,1]$ only that it is connected (i.e. has no non-trivial clopen subsets).
As to order topologies we only need that any connected subset of $W$ is (order-)convex. 
The former I think is known to you, the latter might not be: suppose $Y \subseteq W$ is connected. Let $a,b \in Y$ with $a < b$ and let $c \in (a,b)$. We need to see that $c \in Y$ as well, so suppose it's not.
Then $U = (\leftarrow,c) \cap Y$ is open in $Y$ (as a basic open set of $W$ in the order topology, intersected with $Y$), and $V = (c, \rightarrow) \cap Y$ is also open in $Y$, for the same reason.
Because we assumed $c \notin Y$ and $<$ is a linear order, $Y = U \cup V$ (we could only have missed $c$), $a \in U$, $b \in V$, so both are non-empty. This shows that $U$ and $V$ are both non-trivial clopen subsets of $Y$, and this contradicts connectedness of $Y$. So the assumption $c \notin Y$ was wrong, and so $Y$ is (order-)convex.
Now the proof is simple: $[0,1]$ is connected, so its image is connected (as $f$ is continuous) and so the image is convex. 
