Best Practices

1: Always Close Your Tags

2: Declare the Correct DocType

3: Never Use Inline Styles

4: Place all External CSS Files Within the Head Tag

5: Consider Placing Javascript Files at the Bottom

6: Never Use Inline Javascript. It’s not 1996!

7: Validate Continuously

8: Download Firebug

9: Use Firebug! / Developer toolbar

10: Keep Your Tag Names Lowercase

11: Use H1 – H6 Tags – For semantic and SEO reasons, force yourself to replace that P tag with an H6 when appropriate.

12: If Building a Blog, Save the H1 for the Article Title

13: Download ySlow

14: Wrap Navigation with an Unordered List

15: Learn How to Target IE

16: Choose a Great Code Editor

17: Once the Website is Complete, Compress!

18: All Images Require “Alt” Attributes

19: Stay up Late – I highly doubt that I’m the only one who, at one point while learning, looked up and realized that I was in a pitch-dark room well into the early, early morning. If you’ve found yourself in a similar situation, rest assured that you’ve chosen the right field.
The amazing “AHHA” moments, at least for me, always occur late at night. This was the case when I first began to understand exactly what Javascript closures were. It’s a great feeling that you need to experience, if you haven’t already.

20: View Source – What better way to learn HTML than to copy your heroes? Initially, we’re all copiers! Then slowly, you begin to develop your own styles/methods. So visit the websites of those you respect. How did they code this and that section? Learn and copy from them. We all did it, and you should too. (Don’t steal the design; just learn from the coding style.)

Notice any cool Javascript effects that you’d like to learn? It’s likely that he’s using a plugin to accomplish the effect. View the source and search the HEAD tag for the name of the script. Then Google it and implement it into your own site!

21: Style ALL Elements – This best practice is especially true when designing for clients. Just because you haven’t use a blockquote doesn’t mean that the client won’t. Never use ordered lists? That doesn’t mean he won’t! Do yourself a service and create a special page specifically to show off the styling of every element: ul, ol, p, h1-h6, blockquotes, etc.

22: Use Twitter

23: Learn Photoshop

24: Learn Each HTML Tag

25: Participate in the Community

26: Use a CSS Reset

27: Line ‘em Up!

28: Slice a PSD

29: Don’t Use a Framework…Yet – Frameworks, whether they be for Javascript or CSS are fantastic; but please don’t use them when first getting started. Though it could be argued that jQuery and Javascript can be learned simultaneously, the same can’t be made for CSS. I’ve personally promoted the 960 CSS Framework, and use it often. Having said that, if you’re still in the process of learning CSS — meaning the first year — you’ll only make yourself more confused if you use one.

CSS frameworks are for experienced developers who want to save themselves a bit of time. They’re not for beginners

Originally written by jeffrey way


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s