What to use a.m., AM; p.m., PM ?

When to use a.m., AM; p.m., PM ?
Acceptable abbreviations for ante meridiem(before noon) and post meridiem(after
noon), with the lowercase forms being preferred. Formal publications use small capitals, which, if available, may also be used in transcription.

8:15 a.m. or 8:15 AM or 8:15..AM

Do not use these abbreviations with a phrase such as in the morning, in the evening, tonight, o’clock.

8:15 a.m. not 8:15 a.m. o’clock
10:30 PM not 10:30 PM in the evening

Use periods with a.m. and p.m. so that a.m. won’t be misread as the word am.
Do not use periods with the uppercase AM and PM.

Insert a space between the numerals preceding these abbreviations and the abbreviations themselves, but do not use spaces within the abbreviations.

11 a.m. or 11 AM not 11a.m. or 11AM not 11 a. m. or 11 A M