It's hard for me to say if I knew as a child or not because I spent a large part of my early childhood believing I was a dog. See, around the age of 3, where a majority of my first memories are, I was convinced I was a dog named Lucky. But I wasn't just any dog named Lucky - I was Lucky from Disney's 101 Dalmatians, who if my memory serves me right, was a male doggy! I had no interest in being any of the other dogs from there, I just wanted to be Lucky. xD So I guess that was my first experience in wanting to be male? I dunno if it counts though since I also believed I was a dog. o.O
My aunt told me when I was older, but still a fairly young child, I'd just point to random guys on the street and be like, "I wanna be like him when I grow up!" Apparently it didn't matter if they looked like bums or rich business men. I just wanted to "be like them". Then I'd also do the same thing to male cartoon characters, only I'd say stuff like, "I wish I where him!"
As far as anatomical differences go, I was really naive to all of that stuff. My parents kinda sheltered me from that stuff I guess. But I vaguely remember walking in on my dad getting dressed, and wondering to myself when mine would grow. xD I also thought on my 7th birthday, I'd wake up a boy.
My first feelings of actual dysphoria didn't come until I was 9, right around when I started puberty. My mom decided it was time for me to wear bras, and did I ever resent those! The first time I wore one after about a month or so of daily arguing, I was so upset I started throwing up. Then a few months later, also at 9. I got my first period, and it just devastated me to the point I didn't know how to react. In fact, I don't remember if I had a reaction at all. I just remember thinking I was some diseased child. And from my mother's descriptions and attempts to make me feel better, I knew I would never be a boy. After all, I wasn't. Who was I kidding. I went into deep denial and did everything I could to validate myself as a girl. Was I ever miserable!
So all that aside, I would say it was half and half. I honestly didn't know trans people existed until I was around 12, and by then I was in such denial and so sucked into validating myself as a female that it didn't cross my mind until years later.