Coders' Guidebook

SEO lessons: five tips for optimising a web page and boosting its position in search results

In this article, we will explore five different ways to optimise your web pages so they rank well in search engine results and offer a superior browsing experience for your visitors.

Image file sizes

Search engines such as Google want to be sure that visitors they send to your website will be able to find what they need quickly and easily. For this reason, it is important to ensure your web pages load quickly because delays could cause visitors to leave your website and search for their query again. This is not what search engines want. A simple way to accelerate the time it takes to load a web page is ensuring all files are as small as possible to minimise bandwidth requirements. The web pages themselves are often small, so there are little savings to be made there; however, images are one area where you are likely to find opportunities for downsizing and optimisation.

In our tutorial on styling elements using CSS, we explained how to set the size of an image. For example, you could make an image appear 200px wide and 300px tall using the following CSS:

.small-img {
	width: 200px;
	height: 300px;

Imagine though that the image file itself was a lot larger (e.g. 1000px wide and 1500px tall). The image file would be bigger than it needs to be given how much space it will occupy on the web page. In this instance, it would be advisable to shrink the image file so it can be downloaded faster by the visitor's web browser. The PicResize tool is an easy way to achieve this.


When creating a web page it is often beneficial to incorporate a handful of keywords regularly throughout the web page. These keywords should accurately and comprehensively describe the web page's content. And if you can identify keywords that potential visitors are likely to search for then even better!

There are several tools you can use to help refine your selection of keywords. For example, if you have set up Google Search Console for your website then you can find a list of search terms that have led people to your website on the Performance tab.


Another useful way of identifying good keywords is to copy those which are working well for successful websites. For example, SEMrush offers a service that allows you to see which search queries are most effective at driving traffic to a given website.

You should incorporate your selection of keywords and phrases regularly throughout the web page; however, beware of overdoing it. Once upon a time, it was possible to boost your website's position in search rankings by repeating the same keywords over and over again in text that was the same colour as the web page's background. The text would be invisible to visitors but search engines would detect the text when they scanned the webpage. Nowadays, search engines such as Google have measures in place to detect "over-optimisation" and will restrict your website's ranking in search results accordingly. The best way to avoid over-optimisation penalties is to use keywords only when it makes logical sense. So long as you continue to write naturally then you should be fine.

File names

One useful place to use your keywords is in the name of the web page file. Search engines such as Google look at the name of the file (as well as its title and headings) to understand what the web page is about and which search queries it applies to. As such, a file name which uses several carefully selected keywords separated by hyphens can help boost a web page's position in search rankings. For example, if you had a web page containing Mediterranean vegan recipes then mediterranean-vegan-meal-recipes.html is likely to be a more effective file name than veganrecipes.html

The same advice for web page file names also applies to other files you use on the web page such as images. Try to include a couple of keywords in the names of such files. For example, vegan-aubergine-tomato-traybake-recipe.png is likely to be more effective than traybake.png.


Naturally, the content of the web page plays a central role in the success of the web page in search results. Search engines such as Google tend to favour in-depth written content which comprehensively addresses the visitor's query; they don't want users to have to repeatedly search for their answer.

A broad variety of content formats on the web page is also looked upon favourably. Try to break up the text with images, videos and other types of content where possible. Also, embedding a YouTube video on the web page is especially effective with Google, given Google and YouTube are part of the same organisation.

<<< Previous

Next >>>