[proofplan]
We construct $\mathbf{Top}$ by specifying its objects, morphism classes, identity morphisms, and composition law. The only substantive points are that identity maps are continuous and that continuous maps are closed under ordinary composition. Once these are verified, associativity and the identity laws follow from the corresponding laws for functions.
[/proofplan]
[step:Define the objects morphisms identities and composition of $\mathbf{Top}$]
Let $\operatorname{Ob}(\mathbf{Top})$ be the class of all topological spaces. Thus an object of $\mathbf{Top}$ is a pair $(X,\tau_X)$, where $X$ is a set and $\tau_X$ is a topology on $X$.
For two objects $(X,\tau_X)$ and $(Y,\tau_Y)$, define the morphism class
\begin{align*}
\operatorname{Hom}_{\mathbf{Top}}\big((X,\tau_X),(Y,\tau_Y)\big)
=
\{f:X\to Y \mid f^{-1}(V)\in \tau_X \text{ for every } V\in \tau_Y\}.
\end{align*}
Thus the morphisms are exactly the continuous maps.
For each object $(X,\tau_X)$, define its identity morphism to be the identity map
\begin{align*}
\operatorname{id}_X:X&\to X,\\
x&\mapsto x.
\end{align*}
For objects $(X,\tau_X)$, $(Y,\tau_Y)$, and $(Z,\tau_Z)$, and morphisms
\begin{align*}
f:X&\to Y,\\
g:Y&\to Z,
\end{align*}
define their composite in $\mathbf{Top}$ to be the ordinary function composite
\begin{align*}
g\circ f:X&\to Z,\\
x&\mapsto g(f(x)).
\end{align*}
[/step]
[step:Verify that identity maps are continuous]
Let $(X,\tau_X)$ be a topological space. To show that $\operatorname{id}_X$ is a morphism in $\mathbf{Top}$, let $U\in \tau_X$ be open. Since the preimage of $U$ under the identity map is itself,
\begin{align*}
\operatorname{id}_X^{-1}(U)=U.
\end{align*}
Because $U\in \tau_X$, this preimage is open in $X$. Hence $\operatorname{id}_X:X\to X$ is continuous, so it belongs to
\begin{align*}
\operatorname{Hom}_{\mathbf{Top}}\big((X,\tau_X),(X,\tau_X)\big).
\end{align*}
[/step]
[step:Verify that continuous maps are closed under composition]
Let $(X,\tau_X)$, $(Y,\tau_Y)$, and $(Z,\tau_Z)$ be topological spaces. Let
\begin{align*}
f:X&\to Y,\\
g:Y&\to Z
\end{align*}
be continuous maps. We show that $g\circ f:X\to Z$ is continuous.
Let $W\in \tau_Z$ be open. Since $g$ is continuous, $g^{-1}(W)\in \tau_Y$. Since $f$ is continuous and $g^{-1}(W)$ is open in $Y$, we have
\begin{align*}
f^{-1}\big(g^{-1}(W)\big)\in \tau_X.
\end{align*}
For every $x\in X$,
\begin{align*}
x\in (g\circ f)^{-1}(W)
&\iff g(f(x))\in W\\
&\iff f(x)\in g^{-1}(W)\\
&\iff x\in f^{-1}\big(g^{-1}(W)\big).
\end{align*}
Therefore
\begin{align*}
(g\circ f)^{-1}(W)=f^{-1}\big(g^{-1}(W)\big)\in \tau_X.
\end{align*}
Since this holds for every $W\in \tau_Z$, the composite $g\circ f$ is continuous.
[/step]
[step:Verify the category axioms using ordinary function composition]
It remains to check associativity and the identity laws. Let
\begin{align*}
f:X&\to Y,\\
g:Y&\to Z,\\
h:Z&\to W
\end{align*}
be morphisms in $\mathbf{Top}$. For every $x\in X$,
\begin{align*}
\big(h\circ(g\circ f)\big)(x)
&=h\big((g\circ f)(x)\big)\\
&=h(g(f(x)))\\
&=(h\circ g)(f(x))\\
&=\big((h\circ g)\circ f\big)(x).
\end{align*}
Thus $h\circ(g\circ f)=(h\circ g)\circ f$ as maps $X\to W$.
Now let $f:X\to Y$ be a morphism in $\mathbf{Top}$. For every $x\in X$,
\begin{align*}
(f\circ \operatorname{id}_X)(x)=f(x),
\end{align*}
so $f\circ \operatorname{id}_X=f$. For every $y\in Y$,
\begin{align*}
(\operatorname{id}_Y\circ f)(x)=f(x)
\end{align*}
for every $x\in X$, so $\operatorname{id}_Y\circ f=f$.
Therefore the specified objects, morphisms, identities, and composition satisfy all category axioms. Hence topological spaces and continuous maps form the category $\mathbf{Top}$.
[/step]