Habitat is the natural environment in which a particular species lives whereas niche describes how an organism responds to the environmental conditions and its interactions.
A single habitat might harbour different organisms in it but every organism has a definite tolerable condition and a role in the environment.
An example of the same is that in a forest we can find different plants but an oak tree dominates a forest canopy, turning sunlight into food. So we can conclude that niche is a part of a habitat.
Rate this question :