Simple example of a continuous onto function mapping $[0,1]$ to $\mathbb R$ There should exist such a function, but I cannot think of any example.
Onto continuous functions mapping $(0,1)$ to $\mathbb R$ are easy to find.

Edit: Sorry - I mentioned Tietze extension theorem proved the existence of such a function - that was wrong. I mixed it up with a different question.
No such function exists. $[0,1]$ is compact, $\mathbb{R}$ is not compact, and the continuous image of a compact space is compact.
No such function exists from $\mathbb{R}$ to $\mathbb{R}^2$. If you omit some lines from $\mathbb{R}$, it's not connected anymore, but $\mathbb{R}^2$ stays connected.