Under the hood of your website

By Justin Jackson,

Digital is an essential skill for today’s PR practitioner: this year’s State of the Profession showed that around a third of recruiters valued technological expertise.

Understanding what happens ‘under the hood’ of your website is essential. You have a better grasp of what (isn’t) possible and what (isn’t) a good idea. You can express yourself more clearly when dealing with developers. And you can push back if you don’t get what you or your client needs.

So, what do you need to know? A website has four moving parts:

  • HTML
  • CSS
  • Javascript
  • ‘server side’

Most of us are familiar with the first, HTML. This is where <tags>appear</tags>.

They mark up your text to give it meaning. For instance, they set out where an article or section begins and ends; identify headings, paragraphs, and quotations; and allow you to add links to other pages.

What HTML doesn’t do – at least if we follow best practice – is set out how the web site should be displayed. Its job is to tell us about the content.

Presentation is the role of CSS or ‘cascading style sheets’.

They explain what colours, fonts, layouts, and animations to use. It’s effectively a computer readable version of your brand guidelines.

Separating content and presentation between HTML and CSS is hugely important, because it allows us to change one without the other – refreshing the look and feel of a website or introducing a completely new visual identity.

It allows for a division of labour, too, with copywriters focusing on HTML and designers on CSS.

It’s also how a web page can adapt to mobiles, tablets, and laptops; create a printer friendly version; or ensure it’s accessible to people with failing sight.

Yet what really brings a website to life is Javascript. This is a programming language that runs in the browser and allows a page to (almost) think for itself.

For instance, it might check that you’ve entered an email address before submitting a form, reorder the contents of a table, or make suggestions in a search box.

As Javascript runs on the visitor’s machine, it’s very responsive. Yet it’s also deliberately limited, so malicious programmes can’t take control.

That’s one reason why a lot of code sits on the server. It’s far more powerful, since it doesn’t have to be restricted – and, what’s more, can call on a huge amount of resources, connect to other websites, and run 24/7.

You can use Javascript on the server as well as the browser, but there’s a much wider choice. PHP, Python, Ruby, and Java (no relation) are popular alternatives.

They all come with a choice of libraries to save writing essential code from scratch. Some of these are skeleton websites in their own right, working ‘out of the box’ so you can get up and running straight away. WordPress is probably the best known example.

If you’d like to find out more, tackle the four ‘moving parts’ in the order suggested in this short blog post (they increase in difficulty) or choose the one that interests you most: HTML for content, CSS for presentation, Javascript for dynamism, and the server side for really heavy lifting.

Justin Jackson Chart.PR, MCIPR, Dip CIPR is running Coding: Web essentials for PR on 23 September in London.

Photo by Chris Ried on Unsplash

Comments

Leave a Reply