Here is definition which I used:
"Let X be a topological space and , the ring of continuous function on X . The level set of f is defined at is the set . The zero set of f is defined to be the level set of f at 0 . The zero set of f is denoted by Z(f) . A subset A of X is called a zero set of X if A=Z(f) for some .
Alternatively, let . If we're done, so assume not. Then, is a limit point of and so there exists a sequence of points such that . But, since is continuous we know that and so . It follows that which finishes the argument.
What about which is the identity function. is closed in the domain but it's not the zero set.