Is it true or false that every element $f \in L^2[0,1]$ is orthogonal to every element $g \in L^2[1,2]$, where both spaces are treated as subspaces of $L^2[0,2]$? (Edit: I treat these as subspaces by associating each $f\in L^2[0,1]$ with an element $f_2 \in L^2[0,2]$ defined as $f_2(t) = f(t)$ if $t \in [0,1]$ and $f_2(t)=0$ if $t\in (1,2]$)
I thought this might be true because $\langle f, g\rangle$ is computed with a Lebesgue integral, which I thought should not depend on a (bounded) function's value at any specific point in the range of integration. Since the intervals $[0, 1]$ and $[1, 2]$ intersect just at $\{1\}$, then region of integration for which both functions are nonzero is at most a point, which vaguely feels like it should result in $\langle f, g\rangle = 0$, but this is clearly not a rigorous argument.
However if we think of $L^2[0,1]$ as a closed subspace of $L^2[0,2]$, then the algebraic complement of $L^2[0,1]$ should be open and so cannot be $L^2[1,2]$.
As noted by @whpowell96, your statement of the problem misses the specific way in which you embed $L^{2}[0, 1]$ and $L^{2}[1, 2]$ into $L^{2}[0, 2]$. If you define the embedding of the function from $L^{2}[0, 1]$ into $L^{2}[0, 2]$ to equal zero at $[1, 2]$, and the embedding of the function from $L^{2}[1, 2]$ to equal zero at $L^{2}[0, 1]$, as your post seems to suggest, then it is, of course, true that $$\int_{0}^{2}\overline{f(x)}g(x)dx=0$$ for $f(x)$ from $L^2[0, 1]$ and $g(x)$ from $L^{2}[1, 2]$. Note that this is usually not the way the notion of $L^{2}[a, b]$ functions is treated. For instance, it is common for a family of polynomials to form an orthonormal system at $L^{2}[a,b]$, yet polynomials are zero only at a finite number of points. The fact that they belong to $L^{2}[a, b]$ only means they are square-integrable on $[a,b]$, and tells nothing of their behaviour on a different segment of the line. So two functions, one from $L^2[0, 1]$ and another from $L^{2}[1, 2]$, can easily be non-orthogonal on $[0, 2]$, moreover, a function from $L^2[0, 1]$ can easily be undefined on $[1, 2]$ or not belong to $L^{2}[0, 2]$.