Is there a good website or book that gives best practices for HTML layouts? I mean how to use divs to build differet kinds of layouts in a proper way. Thanks
I'd recommend going to CSS Zen Garden (http://www.csszengarden.com/). They're a site that is essentially having an eternal design contest, so they give you well structured markup to style (so you can see how they do it and take a stab at styling as well).
Good luck!
For HTML, there is really only one wellwritten book I know of: HTML Mastery.
HTML Mastery focus on HTML alone, without losing focus telling about CSS and JavaScript.
HTML5 is hot these days though. Introducing HTML5 is a quick read, so is HTML5 for Web Designers.
I use this basically as a guide:
http://www.hotpepper.ca/articles/semantic.shtml
Also check W3Schools on definitions of the different HTML tags and what you need to use them for. For example, you wouldn't use the < caption > tag for something that isn't a caption, would you?
Same thing for paragraphs, unordered lists, etc. One primarily bad example I saw from my former job was ordered lists. They used ordered lists to list down some users. That is good, but in the css, they hid the decimals. That means they could've have done with UN-ordered lists, which is what they should have used.
Always ask yourself why you are using a tag before using it. "Do I really need to emphasize this text? If yes, I should use an < em > tag." etc etc
See The 960 Grid System Made Easy. http://sixrevisions.com/web_design/the-960-grid-system-made-easy/
精彩评论