Archive for the ‘Tips & Tricks’ category

Under used HTML tags

The current specification of HTML has been around for nearly 10 years now and us web developers all use this fundamental language on a daily basis. However, due to our busy schedules, there are a few HTML tags that tend to get either neglected or used in the wrong way.

I’m going to list a few of the more important tags here with some examples of their use. Hopefully this article will provide you with some guidance to why we should use them.

1. <address>

As the name suggests, the <address> tag is used to display contact details of the author of a web page. This means that you can standardised the format of either yours or your users contact details to make them easily identifiable.

The important thing to note is that the <address> tag is not limited to just a postal address, but you can include any contact details, such as a name, email, phone number, URL, etc.

For example:

<address>
    Written by: Ian Harris<br />
    Email: <a href="mailto:info@example.com">info@example.com</a><br />
    Phone: 01234 567 890
</address>

Although the <address>tag should be used where possible, that is a better alternative in the form of microformats. Take a look at the hCard Microformats wiki page for more information.

(more…)

5 Simple but useful JavaScript snippits

JavaScript can be employed on your website to perform an whole multitude of simple, but quite effective, tasks that make your job as a web developer that little bit easier. Over time, we have compiled a library of these little JavaScript snippets and we have listed a few of our favourites here.

1. ‘Previous Page’ link

This snippet will take the user back to the previous page that they have viewed. Pretty much like the standard browser back button really:

<a href="javascript:history.back(1)">Previous Page</a>

(more…)

UK Postal Counties List

On a recent project, we were required to create a drop down list to display the UK’s counties as part of a web form collecting users addresses. We assumed that this would be a pretty standard task and that there would be an abundance of pre-configured lists available on the Internet for download. After about an hour of research, it became clear that it was not going to be that simple. All of the lists we unearthed were either incomplete or out of date and it seems that we were not the first developers to run into this trouble.

You can see how it is easy to get it wrong though, take a look at the Wikipedia list of UK counties. The list of counties has changed quite considerably over time, especially in Wales.

(more…)