Question: What's a good book, or a good way to learn HTML, XHTML, and CSS? I recently graduated from school and I only know Java, and C++.

I would like to learn some web development so I am looking for some good books and resources.

Answer: 
IMHO, the best way to learn it is by doing it, make a plan for a website, and have a go at making it happen (repeat as required), by the time you put html, css, javascript, and eventually a server side framework together, it can be a bit of a dark art, and there is much learning that can only happen when you are actually doing it (and feeling the pain of IE 6). 

As mentioned by others, Sitepoint, Smashingmagazine, W3Schools (to name a few) are all handy references. 

Would also suggest learning jquery as you learn javascript, some good starting tutorials here <http://docs.jquery.com/Tutorials>.

Also install firebug in firefox so you can start digging under the hood of sites you like. 

With regard to books, from personal experience, I have a stack of outdated technology specific books that I have not touched for quite a few years. The ones that focus on why rather than how get much higher rotation.

If you have learnt java and c++, the mechanics of the technologies shouldn't be too hard to pick up, but many programmers tend to suck at things related to UI, so if you were to get a book, I would recommend "Don't Make Me Think" or other books related to usability and interface design.

HTH. Good Luck.
I'd recommend [Professional CSS: Cascading Style Sheets for Web Design](https://rads.stackoverflow.com/amzn/click/com/047017708X). There apparently is a second edition now, but my first edition has:

> 
> Chapter 2: Best Practices for XHTML and CSS
> 
> 
> 

The book (first edition) is basically comprised of case studies of css and xhtml implementations at ESPN, PGA Championship, and the University of Florida, with many great tips and explanations of why things are done a certain way.