Definition of Product Topology 
Definition: If $X$ and $Y$ are topological spaces. The product topology on $X \times Y$ is the topology having basis the collection $\mathcal{B}$ of all sets of the form $U \times V$, where $U$ is an open set of $X$ and $V$ is an open set of $Y$

I've taken this definition from Munkres: Topology - A First Course and the notation he uses at times can be highly confusing. For example he uses $x \times y$ to denote an ordered pair $(x, y)$.
Now I'm not sure in the definition whether $U \times V$ is denoting the cartesian product of the two sets, or the ordered pair $(U, V)$
So which of the following is the correct basis for the product topology as stated in the definition above, given that $\mathcal{T_X}$ is the topology on $X$ and $\mathcal{T_Y}$ is the topology on $Y$?
$$\mathcal{B} = \left\{U \times V \ \middle| \ U \in \mathcal{T_X} \ \text{ and } \ V \in \mathcal{T_Y}\right\}$$
$$\mathcal{B'} = \left\{(U, V) \ \middle| \ U \in \mathcal{T_X} \ \text{ and } \ V \in \mathcal{T_Y}\right\} = \mathcal{T_X} \times \mathcal{T_Y}$$
 A: As already said in comments, the basis consists of Cartesian products $U\times V$, where $U$ is open in $X$ and $V$ is open in $Y$.
You can notice that that other possibility does not make sense, since sets from $\mathcal B$ must be subsets of $X\times Y$.

Product of finitely many topological spaces is defined in similar way as for two spaces. But perhaps it is worth to add a word of warning that if you define product of arbitrarily many spaces, then you have to be a bit more careful. (If  you simply take products of open sets, you would get box topology, which has different properties from product topology.)
A: I just want to spell this out a little more explicitly for anyone who's confused about this. Here's an easy way to tell which of $\mathcal B$ and $\mathcal B'$ is correct. If you know what a base/basis is, then you know that you're supposed to be able to create any open set (element in the topology) through union of elements (sets) in the basis.
If you look at $\mathcal B$ and $\mathcal B'$, you'll see that elements in the former are sets (such as $U \times V$), but elements in the latter are pairs of sets (such as $(U, V)$). The union operation is applied to sets, so it's not even applicable to elements of $\mathcal B'$. Therefore, $\mathcal B'$ can't possibly be correct, so it must be $\mathcal B$.
