I've been using HTML and CSS for years, and I'm pretty proficient but I'm continually frustrated by browser compatibility issues. Are there any notable books that have helped you understand the details of HTML and CSS and write compatible markup?
My Favourites are always by Oreily but, for css this is my bible http://www.sitepoint.com/books/cssref1/ because most of the time it discusses browser compatabilities which is very important in CSS with double float bugs and other things galore
I agree that sitepoint publish very good HTML and CSS resources, both online and in books.
You have to have the ccorage of your conviction to publish a book entitled "Everything you know about CSS is wrong!" which looks at the forthcoming world where we don't have to apply the hacks for IE6 and encourages a re-evaluation of the techniques we are using for cross-browser compatability.
CSS Mastery had a massive impact on my CSS understanding and usage.
For a first book, I recommend Head First HTML with CSS & XHTML. At first I thought the book was fluffy because it has so many quirky photos etc. But it's actually has a lot of solid content. And it's a quick read.
For more technical details of HTML, I recommend Refactoring HTML. The book is especially good for advice on moving from legacy HTML to standard compliant HTML.
I used the first edition of HTML Artistry: More Than Code years ago and found it to be excellent.
More recently I've been a fan of the W3Schools site.