6. Let $M$ be a subset of the set $S=\{1,2,3, \cdots, 1998\}$, and each natural number (element) in $M$ contains exactly one 0. Then the maximum number of elements in the set $M$ is ( ).
(A) 324
(B) 243
(C) 495
(D) 414
6. (D).

Divide the set $S$ into four subsets
$$
\begin{array}{l}
S_{1}=\{1,2, \cdots, 9\}, \\
S_{2}=\{10,11, \cdots, 99\}, \\
S_{3}=\{100,101, \cdots, 999\}, \\
S_{4}=\{1000,1001, \cdots, 1998\} .
\end{array}
$$

Let $M_{i}^{r}$ represent the set formed by all elements in $S_{i}(i=1,2,3,4)$ that contain exactly one digit 0.
Obviously, none of the elements in $S_{1}$ contain 0, so $\left|M_{1}\right|=0$;
In $S_{2}$, there are 9 elements where the unit digit is 0, so $\left|M_{2}\right|=9$;

In $S_{3}$, there are $9^{2}$ elements where only the unit digit or the tens digit is 0, so $\left|M_{3}\right|=2 \times 9^{2}=162$;

In $S_{4}$, there are $9^{2}$ elements where only the unit digit, the tens digit, or the hundreds digit is 0, so $\left|M_{4}\right|=3 \times 9^{2}=243$.

Therefore, $|M|_{\text {max }}=\left|M_{1}\right|+\left|M_{2}\right|+\left|M_{3}\right|+\left|M_{4}\right|=414$.