Which of the following statements are true about the open interval (0,1) and the closed interval [0,1]?

I. There is a continuous function from (0,1) onto [0,1].

II. There is a continuous function from [0,1] onto (0,1).

III. There is a continuous one-to-one function from (0,1) onto [0,1].

My thoughts:

III is definitely wrong. Because if there is one-to-one function, the topological property of the domain and range should be same.

I is true. There is an example on sfmathgre.blogspot.com

But any thoughts on why II is wrong?