You put your hand over your heart for the Pledge of Allegiance and stand at attention for the Anthem. Trust me, I was in 'Nam and Desert Storm.
This is what I was taught as well (Army brat). It was weird to come to the US and see you idiots holding hand over heart for the ole Star Spangled, but I do it now too for fear of being shamed.
Pop quiz: what do you do for Retreat?
I always thought it was pretty cool on Fort LV to see cars pull over and folks get out and stand.