Let $\tau$ be the topology in $\mathbb{R}^2$ whose open sets are of the form $$G_t = \{ (x,y)\in \mathbb{R}^2 \mid x>y+t\}, \; t\in \mathbb{R}$$ Is the union of two lines $r\cup s$ connected in $(\mathbb{R}^2,\tau)$?
What I did was consider $r\cup s$ as subspace of $\mathbb{R}^2$ and assume that therexist $A$ and $B$ such that $$r\cup s = A\cup B$$ and $A\cap B =\emptyset$. Then we can write $A$ and $B$ as $$A=(r\cup s)\cap G_{t_1},\, B= (r\cup s)\cap G_{t_2}$$ But since for every $t_1, t_2 \in \mathbb{R}$, $G_{t_1}\subset G_{t_2}$ or $G_{t_2}\subset G_{t_1}$, we have that $$A\subset B\; \text{or}\; B\subset A$$ In any case, $A\cap B\neq \emptyset$ and hence there is no separation of $r\cup s$, so $r\cup s$ is connected.
My question then is if this proof is okay, and also if it works too for any subspace of $(\mathbb{R}^2,\tau)$ since I haven't use at all anything about the two lines. Also
Are there other examples of topologies in $\mathbb{R}^2$ such that all subspaces are connected?
The spaces which have every subspace connected are essentially the total preorders EDIT: but see below.
In one direction, given a space $X$, define a relation $\le$ on $X$ given by $a\le b$ if every open set containing $b$, also contains $a$. This relation is clearly a preorder. If every subspace of $X$ is connected, then $\le$ is total: for every $a, b\in X$, either $a\le b$ or $b\le a$ (otherwise, $\{a, b\}$ would be a disconnected subspace of $X$).
Conversely, suppose $(L, \le)$ is a total preorder. Then we can turn $L$ into a topological space by taking as the opens those sets of the form $\{b: b\le a\}$ for $a\in L$. The preorder associated to this space is exactly $(L, \le)$. So this is an exact characterization.
This answer is actually incorrect in a subtle way, as Eric Wofsey points out below: the preorder assigned to a space does not characterize it! Specifically, we can have two spaces with isomorphic preorders, which are not homeomorphic. An easy example is: any two Hausdorff spaces with the same cardinality.
We can even come up with a hereditarily connected example! Let $X=\mathbb{N}\cup\{\infty\}$, and consider the following two topologies on $X$:
$\tau=\{\{k, k+1, k+2, . . . \}\cup\{\infty\}: k\in\mathbb{N}\}\cup\{\emptyset\}$,
$\sigma=\{\{k, k+1, k+2, . . . \}\cup\{\infty\}: k\in\mathbb{N}\}\cup\{\{\infty\}\}\cup\{\emptyset\}$.
It's easy to show that $\tau$ and $\sigma$ yield the same preorder.
However, this is a homeomorphism invariant for finite hereditarily connected spaces, or - even better - spaces whose associated preorder has finitely many equivalence classes. Roughly speaking, two hereditarily connected spaces with the same preorder differ only at the limit points in that preorder (although it's a bit messy to make this precise).