I would say that that depends entirely on what you are doing online.
Sometimes people don't even reveal their gender and I don't think that either is necessary in some circumstances. However as a child (sorry I know it may not always be fun to be referred to as a child - but legally until the age of 18 that is what one is) it is sometimes good to let people know online. In the end it is up to the other people to take your age into account and act appropriate due to that. Some will but others won't care because they may feel that it is up to your guardian/s (such as parents for example) to keep an eye on what you do and if they imagine you are online (on whatever site) it is "okayed" by them or they might not have the understanding/decency to behave correctly towards or around a minor.
Online a lot of the responsibility is placed on the user and it can seem wrong to ask a child to make decisions on things that sometimes may require a deeper understanding (that for instance at times only comes with age). However Koda, if you ever feel uneasy, uncomfortable, like something isn't entirely right - it might only be a very small feeling that you may wish to dismiss as unimportant - I do urge you to listen to that "voice" because our instincts on such matters are always right. One always needs to be careful and protect oneself. Obviously I don't mean that you should be suspicious of every person you meet online, but now and then you might get a "funny feeling" about a comment or a user and on such occasions you should always opt to be careful of your person. Never give too much information about yourself and your personel life to someone you just met online (I am sure you already know this). If you feel that you are connecting well with someone and feel like they are friends then let an adult you trust know (or an older sibling or a friend) about them, that way if anything strange happens there is already someone in your life who knows about that person and it can be easier to handle whatever may come up.
If you are using forums, chats, apps or sites that are open to anyone it can be good to not share much. However sometimes it can be good for older users to know the ages of those in the same "room". That way if anyone acts inappropriately some other group members can be there to help/protect/stand up for/with you.
I always assume that people are decent until they prove otherwise because most people are. However there is always a risk online. If many friends get together they can at times push each other to act less appropriate or a topic can perhaps get a bit to "adulty", out of hand or inappropriate. I don't live under the illusion that kids don't hear about most things, due to the internet making most things so available to anyone. But not all grownups know how to properly talk, write and inform younger people about those things which can lead to a lot of misunderstandings and misconceptions about stuff.
In a perfect world every user online would be decent and look out for one another no matter our age or gender but those are not always the reality of things. I remember being 12 years old and genuinely feeling so grown up - now at my current age I understand that I really wasn't. Sure I was older and had more experience then I had ever had before but I also had nothing else to compare my 12 years of living with. And I might have been a smart kid but I definitely did not know everything! I got my firs mobile when I was 14 and that was just for calls and texting. I don't know how I would have used an android phone at that age. And can only go from what my pupils talk to me about. Sometimes they show me stuff they post online and ask questions about this or that and I always listen and have an intrest to know. But I also tell them that the it-world has changed so much in the past 15 years that I genuinely did not have the possibilities of being so globaly connected through so many different mediums as they have. And that this comes with both ups and downs!
It is a really good question you have asked and I am afraid my answer will confuse you more then help you - hopefully you understand what I am trying to say. And you can always contact me or anyone else from cybersmile.org by writing on the forum or mailing.
Ps. I also have a twitter account (that I usually forget to use but I do have the notifications on) so if you ever want/need to contact me there - matters big or small - please do so.