thanks guys, that makes sense :) ill try that !!
She's just learning how to express herself. Let her know that hitting isn't the way to get what she wants. Ways to do that would be to frown, say "No" and then ignore the behavior. Let her know she won't get attention when she does that. Trying to hold her arms down will just make her more angry.
When my girls throw tantrums, I completely ignore the behavior. I let them scream and throw themselves on the floor. So long as they're safe I ignore them. Once they calm down I get down on their level and say, "That is not how you act. When you need _____ then I need you to use your words, not tantrums."
So I think in the case of a 5-month old you can frown, tell her "No" and then ignore the behavior until she calms down. Then re-direct her to a new activity and smile again to show her that you're happy she calmed down.
she's probably just exploring what movements she can make at this stage...my eldest was handgliding on people's hair at about the same age. maybe it is a way for her to express herself too...but i really wouldn't worry at this point.