Books on semantics and logic

I know it’s one thing to KNOW a language inside and out, but actually writing it in good semantic form that makes sense is another. Kind of like how knowing English alone doesn’t make you a good essay writer, you just know English.

I don’t just want to know CSS, I wan’t to know how to compile CSS/HTML documents correctly in a way that makes sense.

Are they’re any good books that teach good semantics/theory for HTML/CSS? Or any good articles?

Thanks in advance!

-Chris

As long as you know the rules of CSS, how you write them is up to you, really, and depends on what you find most readable and logical. I pretty much do things differently for each site as I think up better ways to organize styles. Probably the best way to learn is to look at the style sheets of others and see what does and doesn’t work for you.

I haven’t come across many books or even articles that discuss CSS or HTML patterns. The patterns I use myself have emerged from a combination of experience and looking at what other people do. That said, my CSS patterns and organization have changed significantly over time. I really have yet to discover a way to organize CSS that I am 100% satisfied with.

Actually, I know what you are saying… tho it really only applies to HTML. CSS is for styling, and while you may take a stab as to how to name classes and IDs so that a coder that comes after you can understand your logic. the best you can hope for is an educated guess. HTML is another thing, each tag DOES represent a HIERARCHY. But that all it does represent.

For example… a client may feel that he wants <H1> tobe the name of his company and <H2> to be the actual heading of the main story… OR the other way around and give the brand ( name of the company) No semantic value whatsoever and use an H1 for the head of the lead story. Either method could be correct.

So then the important thing is, given that as I said before HTML defines the hierarchy, to let know what is your ( or your clients) own meaning and hierarchy.

Hmmm. If you’re asking what I think you’re asking, I compiled some methods for organizing your stylesheet in my “how-to” site:

Organized Stylesheets

The method that I liked, which if I recall I “created” by mashing up several different approaches, is something like this:

Reset
Global Styles (body, paragraphs, lists, etc)
Page Structure
Heading
Main Content
Sidebar
Footer
Headings
Text Styles
Navigation
Search
Links
Forms
Comments
Miscellaneous

Not that I always follow this, but it makes sense to me…