A few good web development practices

Every web developer out there should use a set of un-written guidelines when developing any website. Here are the rules I follow and the reasons for doing so:

Use a CSS reset style sheet

As the name implies, it resets all the attributes of all the html tags. Why would you want to do this?  Well the developer will be forced to not rely on default values of certain attributes (the margin of a paragraph for example) and specify them according to his needs. This will minimise cross-browser issues.

There are many CSS reset style sheets out there. This is the one I use.

Gzip your website for faster loading

Gzip or GNU zip is defined as any software application used for file compression and decompression.  We all know badwidth is limited so compressing your website before it is sent to the user will make your website load faster. There are many online tools to help you gzip you website.

Search Engine Optimisation

This is a very broad subject to discuss and we will not be able to cover it in detail here. But for the very least do the following:

  • Give every page a different and meaningful title.
  • Use the header tags appropriately: h1 for the most important, try and keep it one per page, h2 for titles, h3 for subtitles and so forth.
  • Use meta tags to describe your website as accurately as possible.
  • Submit your website URL to every search engine out there. To find out how to do it, just search “submit url” with the search engine itself. Usually it’s a simple form to complete.
  • Provide a site map (usually in the footer or as a separate XML file).

Use Google Analytics

Google Analytics is a free service from Google that allows you to track your website’s visitors and offers you many useful information about them (browsers used, bounce rate, most visited page etc. ). Setting up Google Analytics is very easy and all you need is a Google account.

To use it, just follow the steps here: http://www.google.com/analytics/

Coding standards

There is a lot of debate whether or not web standards are useful or not. I think we do need some good coding standards, either for CSS, JavaScript, PHP or plain HTML. Having a set of rules and sticking to them in all your projects will improve your efficiency. Modifying and improving your code will be easier and you can learn faster from your past projects.

Here is a link to a tutorial about good coding practices in web development:

File structure

Organise your website. This is important for maintaining or changing a website in the future. Do not put all your files in the same folder. Instead, put your images in an ‘img’ folder, your scripts in a ‘scripts’ folder and so on.

Comments are closed.