Let $W(\omega_1)$ be the set of all ordinals which precede $\omega_1$. Define a space $X = \{a_n: n \in \mathbb{N}\} \cup W(\omega_1)$ with the basic neighbourhoods of a point of $W(\omega_1)$ are the open intervals of $W(\omega_1)$ to which it belongs, while the basic neighbourhoods of a point $a_n$ are the set $\{a_n\} \cup \{\beta \in W(\omega_1): \beta \geq \alpha\}$ for $\alpha \in W(\omega_1)$.
I know that $[0,\omega_0]$ as a subspace of $W(\omega_1)$ is compact. Is true that the subspace $[0, \omega_0]$ is a compact subspace of $X$? I think it is not true since there is an open cover $(\{a_1\} \cup [\omega_0, \omega_1)) \cup \{\alpha: \alpha < \omega_0\}$ of $[0, \omega_0]$ which doesn't have a finite subcover.
I appreciate any help. Thank in advance.
I think you are confused about what "basic neighborhoods" means here. In particular, the "basic neighborhoods" used to define the topology on $X$ are not necessarily open neighborhoods. Rather, a subset $U$ of $X$ is defined to be open iff it contains a basic neighborhood of each of its points.
In particular, the "open cover" you propose is not an open cover at all, since the set $\{a_1\}\cup [\omega_0,\omega_1)$ is not open. It is a basic neighborhood of $a_1$, but it is not an open set since it contains no basic neighborhood of the point $\omega_0$ (a basic neighborhood of $\omega_0$ would be an open interval around it).
With this definition of open sets, you can see that $W(\omega_1)$ is an open subspace of $X$, and a subset of $W(\omega_1)$ is open iff it is a union of open intervals. It follows that the subspace topology on $[0,\omega_0]$ is just its usual order topology, which is indeed compact.