It is a basic fact of topology that if $X$ is a topological space and $Y\subseteq X$ is homeomorphic to $X$, it does not need to occur that $X=Y$ (for example, $X=\mathbb{R}$, $Y=(0,1)$). My question is, if I add the requirement that $Y$ is dense in $X$. Is this still the case? Or is the following true?
If $X$ is homeomorphic to a dense subspace $Y\subseteq X$, then $X=Y$.