I learned the way _detz_ described ... experimentation. Once I got the basics down (and there aren't very many basics to get down), the rest was applying what I knew to more advanced experiments and trying to keep up with changes in code development.
Also, whenever you run across a webpage that you like while browsing, take a moment to View->Page Source (Mozilla browsers) or View->Source (Internet Explorer) to see how the page was built. You'll quickly begin to recognize the patterns in the code, and simply seeing the code will help with your understanding of the big picture.
You can't hurt anything by typing a page in Notepad (or Editpad, which is what I use, or SimpleText) then saving and opening that file in your browser. It really does open the eyes and excite the imagination when you see that first H1 element big and bold on your screen.
Don't forget to check with the motherlode ... W3.org's Tutorials