However, the U.S. Flag Code and conventions have historically required that only uniformed military personnel deliver the military salute when the national anthem plays. Civilians are to stand at attention with their right hand over their heart. Veterans and service members not in uniform may salute during the national anthem if they so desire, thanks to legislation adopted about 15 years ago.
Read more at:
https://www.star-telegram.com/news/local/fort-worth/article300067754.html#storylink=cpy