How web pages work

When the World Wide Web (the reason a lot of websites start with www) was originally created, there was just one language that web pages were written it, today there are 3 main ones: HTML, CSS and JavaScript. Let’s explore what each of them do.

HTML

HyperText Markup Language or HTML provides the structure and content for a web page.

Back in the 1960s, a laguage was developed at IBM to standardise machine-readable documentation, later called Standard Generalised Markup Language or SGML.

In the early days, HTML was written as an application of SGML, and with each release became closer to SGML until version 4.

However, in HTML 5 the direction of HTML went in a different direction and now HTML no longer follows the strict rules set down by SGML.

CSS

Cascading Style Sheets or CSS provides the style or it’s look and feel.

HTML on it’s own will display web content, but CSS enables the developer to make it behave differently and look more professional.

With CSS 3, there has been more focus on making CSS device friendly, so you can create one HTML page, yet have it view and behave differently whether you view on a desktop, laptop, tablet or phone.

JS

JavaScript or JS for short is all about making the content dynamic.

JavaScript is a programming language that runs on the client side (aka your web browser) to improve how a web page works for you.

Card validation is a common use of JavaScript. Prior to this, if you entered a digit wrong on your card, the seller would be charged for the invalid transaction. JavaScript checks whether the length is correct and then performs a simple check known as Luhn algorithm on the card number, and if the result comes back as zero, the check has passed and the card number is valid and ready to be passed to the processor which will check to see if the card is genuine and hasn’t been cancelled.

Share this post with your friends