Let $X$ be a set with topology with $\tau$. Suppose that $A \subset X$ such that for all $a \in A$ there is an open subset $U_{a}$ containing $a$ and contained in $A$. Prove that $A$ is open.
I think that $A$ can be written as the union of all $a$'s in $A$, thus is contained in the union of $U_{a}$'s. But that alone does not prove that $A$ is open. What in addition do I need to prove such a statement?