It would also be nice if someone can explain this comment appearing on the Wikipedia page on CWcomplexes:
"The homotopy category of CW complexes is, in the opinion of some experts, the best if not the only candidate for the homotopy category."
It would also be nice if someone can explain this comment appearing on the Wikipedia page on CWcomplexes: "The homotopy category of CW complexes is, in the opinion of some experts, the best if not the only candidate for the homotopy category." 


My favorite example of a space which is not homotopy equivalent to a CW complex is the Long Line. All it's homotopy groups vanish (exercise 1) but the long line is not contractible (exercise 2). It's too long! 


A complete explanation of the Wikipedia comment would require delving into the theory of model categories in more detail than would be reasonable here. Unfortunately, there's a paucity of good resources on model category theory at the moment. The standard references are the books by Hovey and Hirschhorn. A model category is an abstraction of the foundations of classical homotopy theory. It provides a set of structures we can use to pass from a category of objects we wish to study to an associated homotopy category. In a nutshell, the idea of constructing a "good" homotopy category (of some category, which in this case is the category of spaces) is to do two things. First, we want to regard certain classes of maps (namely, weak homotopy equivalences) as being invertible. This is done through the notion of localization of a category, which is analogous to (in fact, a generalization of) the notion of the localization of a ring. Secondly, we want to replace every object by an object that behaves nicely with respect to homotopical constructions. These are the "fibrant and cofibrant objects." For example, in homological algebra, we replace chain complexes by quasiisomorphic injective resolutions so that they behave nicely with respect to leftexact functors. In our setting, CW complexes play this role; namely, we can replace any space by a weakly equivalent CW complex. The role of actual CW complexes (as opposed to general fibrant and cofibrant objects, which may for instance only have the homotopy type of a CW complex) is not immediately obvious from the basic definitions. It comes from a more general construction in model category theory in which the class of cofibrations can be reconstructed from small sets of generating cofibrations. The inclusions of spheres as the boundaries of nballs play this role in the Quillen model structure on spaces, and the cofibrations one constructs from this generating set are retracts of relative cell complexes. As Reid points out in his answer, the homotopy category of CW complexes is only "right" up to equivalence; the fact that there are different equivalent "homotopy categories" of spaces stems from the fact that there are different (but in some sense equivalent) model structures that one can put on the category of spaces. Consequently, it's at least a little important to be careful about what we mean by "the" homotopy category. 


The `quasicircle" of Hatcher's Algebraic Topology, Exercise 10 of 4.1, is a nice example. The point is that is has trivial homotopy groups but is not homotopy equivalent to a point, contradicting Whitehead's theorem (I think that is the name of the theorem). 


The Cantor set, or any space X with no nontrivial path which is not discrete. If X did have the homotopy type of a CWcomplex, the identity map from X with the discrete topology to X would be a homotopy equivalence by Whitehead's theorem. But it's easy to see that the only possible homotopy inverse is the identity map, which is not continuous. 


Some Googlefu turned up an example here. 


I hope what that comment on Wikipedia means is that the homotopy category of CW complexes is the "right" homotopy category up to equivalence. There are many other ways to produce the homotopy category, but they all yield equivalent categories. The category of all spaces and homotopy classes of maps is not equivalent to the homotopy category (at least by the obvious functor) as these examples demonstrate. 

