- HTML, CSS, and JS are all very free-form
- Many different ways to do many different things
- Indent everything correctly
- Abstract out as much CSS and Javascript as possible
- Limit inline CSS and JS as much as possible
- Organize CSS files
- CSS is extremely powerful, use it to your advantage
- There is very rarely a reason to do CSS things with JS
- CSS3 is even more powerful
- Do not use IDs in your CSS, they are far too specific
- IDs should only be used for JS manipulation and page anchors
- Use multiple classes, classes compound well and should be flexible
- A class which is so specific it can only be used once is as useless as inline styling
- Learn CSS selectors - they are the bread and butter of CSS
- Use em, not px
- Learn the
display
types, they are very helpful - Minimize selectors, the more concise and specific you can be the better
- Learn the difference between margin and padding
- Which affects width/height?
- Which is colored with
background-color
?
- Don't put everything in one stylesheet
text-transform
can transform text (lowercase, uppercase, capitalize)- Try really hard not to use absolute positioning, it is almost never the answer
- Do not use tables for anything other than data
- Tables are not reponsive and are very fragile
- Use floating divs for columnar elements
clear: both;
for content below
- Use breakpoints to trigger CSS overrides
- Typtical breakpoints are 1200px, 992px, 768px
- JavaScript is very powerful, even without jQuery
- Use JavaScript to do JavaScript things only
- Pick up a JavaScript book, you won't regret it (JavaScript: The Good Parts)
- jQuery and jQuery UI can do almost everything you want
- Spend your time writing new code, not rewriting something someone else aready wrote