I have fun playing guitar, learning songs or licks and solos from songs is fun and all but I really don't know much about these pieces of music and why they sound good. Sometime I want to be able to write music, mainly centered around electric and acoustic guitar but I need help finding where I need to get started.
I want to gain a understanding of music theory, especially guitar related. I want to be able to know how to name a note, name a chord, name a key (understand key s in general), and just learn why and what things sound good together in general. At the moment I don't understand many of things things, but I want to be able to so I can really learn about the guitar and learn how to use it.
It would be great if someone could point me in the right direction or explain some minor things about learning this theory, may it be online reading material, viewing material, or even a book I suppose.
Thanks in advance.
Edit: As stated above I know very little at the moment so the things I've listed above are examples of things I would like to learn, I really just want to learn any theory that can help in writing music and really understanding a piece of music (applicable to guitar), which I know is a lot, but I would like to learn.