Best way to teach yourself how to program?
seven: To learn more about html and css, just download your favourite websites to your local filesystem, start to edit and watch the results.
Try to get some basic concepts about programming. Those first hours are probably not very exciting, but are of great value later. 
Then you could start to learn more about web development by reading and modifying open source applications.
Start with something simple like a guestbook. Then try to do something similar on your own. 
Best way to learn programming is to do it. Modify and watch the results. 
Have fun!