<p>The HTML standard defines a clear separation of concerns between CSS (presentation) and HTML (semantics or structure).</p>

<p>Does anyone use a coding standards document for CSS and XHTML that has clauses which help to maintain this separation? What would be good clauses to include in such a coding standards document?</p>

[{'answer_id': 32478, 'author': 'Lee Theobald', 'author_id': 1900, 'author_profile': 'https://Stackoverflow.com/users/1900', 'pm_score': 3, 'selected': True, 'text': '<p>We don\'t have a physical document we all adhere to where I work. There are a number of guidelines we try and keep in mind but there isn\'t really enough information to require a physcial document.  <a href="http://www.louddog.com/bloggity/2008/03/css-best-practices.php" rel="nofollow noreferrer">This article</a> sums them up these guidelines pretty well.  You may also consider formatting your <code>CSS</code> to make it easier to read.  <a href="http://www.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-styleguides/" rel="nofollow noreferrer">Smashing Magazine</a> has a great article on this subject.</p>\n'}, {'answer_id': 37786, 'author': 'Sam Murray-Sutton', 'author_id': 2977, 'author_profile': 'https://Stackoverflow.com/users/2977', 'pm_score': 0, 'selected': False, 'text': '<p>The article referred to by @Lee Theobald is a good start.</p>\n\n<p>Some basic ideas I try to keep in mind when marking up:</p>\n\n<p><strong>Regarding html:</strong></p>\n\n<p>Try to write for the next person - that is, think about how easy or difficult it might be for someone else to come and pick up your work and carry on. </p>\n\n<p>To support this principle, you should try and make sure your markup is as legible as possible - class and id tags in particular should relate <em>as much as possible</em> to their intended content. In other words, try to use your tags to describe the kind of content they will have.  </p>\n\n<p>For example, "Sub-navigation", "content" etc. </p>\n\n<p>The aim is to provide markup that someone can pickup having not looked at before and get a sense of the logical structure of the document.</p>\n\n<p>Also, try to avoid the addition of markup that is purely to achieve a visual effect. But bear in mind that any website that requires even slightly sophisticated styling is unlikely to be able avoid non-semantic markup, due to weaknesses in current implementations of CSS and browser-compatibility issues.</p>\n\n<p><strong>Regarding CSS files:</strong></p>\n\n<p>Many people divide their css up into sections using comments, separating them into functional or structural areas. So you might have a section for your header, your footer, or typography and so on. Others take this further and split css across files, having one for typography, one for layout etc. However, this can according to Yslow! can have a negative impact on page loading, due to increased http requests.</p>\n\n<p>I could write more, but as you can see I struggle to be concise. I hope this is of some use to you.</p>\n'}]
['https://Stackoverflow.com/questions/31128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2822/']