^^^I always stand at attention with my left hand along my left outer pant seam and my right hand over my heart, or if I am wearing a hat, remove the hat and hold it over my heart.
Depends on the hat for me; with a brim over about 4", I tend to take it off with my left hand, which then goes to roughly where it would be for parade rest, while my right hand is over my heart, empty. Smaller hats, I hold over the heart with my right hand.
Just looks and feels odd to have a very large hat held in front like that. More like hiding behind it than showing respect with it.