From midnight to midday (noon), times are a.m.
From midday (noon) to midnight, times are p.m.
BEFORE NOON is a.m.
AFTER NOON is p.m.
Example
I go for an afternoon bike ride to my friend's house.
Is this a.m. or p.m.?
Answer
Afternoon is after noon, so it is p.m.
Let's have a go at the questions now.