Used attributively before another noun, e.g. "attention span"; treated as adjective per dictionary policy.
Definitionen
Relating to or intended for attracting notice; pertaining to attention (used only before a noun). The workshop covered various attention strategies for young learners.
Used as a command or exclamation to order someone (especially troops) to assume the 'attention' position or to focus on the speaker.
Definitionen
A command ordering someone, especially soldiers, to assume an erect, motionless stance, or an exclamation used to demand focus. "Attention!" barked the drill sergeant.