5. Given the quadratic function $y=a x^{2}+b x+c$ opens downwards, the vertex is located in the second quadrant, and it passes through the points $(1,0)$ and $(0,2)$. Then the range of values for $a$ is ( ).
(A) $a<0$
(B) $a<-1$
(C) $-2<a<0$
(D) $-1<a<0$
5.C.

From the given information, we have
$$
a0, a+b+c=0, c=2 \text {. }
$$

From $a+b+c=0$ and $c=2$, we get $b=-2-a$.
From $a-2$.
And $a0$, so the range of values for $a$ is $-2<a<0$.