Getting a Coding Job: What Do HTML, CSS, and JavaScript Do?

By Nikhil Abraham

If you plan on getting a coding job, you will need to know about some common programming languages that you are likely to encounter. It is a good idea to familiarize yourself with HTML, CSS, and JavaScript.

HTML, or HyperText Markup Language, tells the browser how to display text and images on a web page. Think about how you create a document with a word processor.

Whether you use Microsoft Word, WordPad, Apple Pages, or another application, your word processor has a main window in which you type text, and a menu or a toolbar with multiple options to structure and style that text. You can create headings, insert pictures, underline text, and much more. Similarly, you can use HTML to structure and style text and other elements that appear on a website.

The layout of a word processor.

The layout of a word processor.

Markup language documents, such as HTML documents, are just plain text files. Unlike documents that can be viewed only with the word processor used to create the document, you can view an HTML file using any web browser on any type of computer.

HTML files are plain text files that appear styled only when viewed with a browser.

CSS, or Cascading Style Sheet, styles HTML elements with greater control than HTML. Take a look below. On the left is a Facebook page as you’d see it in your browser. On the right is the same Facebook page without the CSS styling; all the images and text appear left-justified, borders and shading disappear, and the text has minimal formatting.

Facebook with CSS (left) and without (right).

Facebook with CSS (left) and without (right).

JavaScript creates and modifies web page elements, and interacts with the existing web page HTML and CSS. When you visit a web page containing JavaScript, your browser downloads the JavaScript code and runs it client side (on your machine).

JavaScript can create the date picker found on travel websites.

JavaScript can create the date picker found on travel websites.

JavaScript is different from another programming language called Java. In 1996, Brendan Eich, at the time a Netscape engineer, created LiveScript. As part of a marketing decision, LiveScript was renamed to JavaScript to try and benefit from the reputation of the then-popular Java.

JavaScript has continued to evolve. In the last decade, its most important innovation has allowed developers to add content to web pages without requiring the user to reload the page. This technique, called AJAX (asynchronous JavaScript), might sound trivial, but it has led to the creation of cutting-edge browser experiences, such as Gmail.

Gmail uses AJAX, which lets users read new emails without reloading the web page.

Gmail uses AJAX, which lets users read new emails without reloading the web page.

Before AJAX, the browser would display new data on a web page only after waiting for the entire web page to reload. This technique slowed down the user experience, especially when viewing web pages with frequent real — time updates, such as news, sports updates, and stock information. With AJAX, the browser could communicate with a server in the background, and update the current web page with new information.

Here is an easy way to think about AJAX: Imagine you’re at a coffee shop and have just ordered a coffee after waiting in a long line. Before asynchronous JavaScript, you would have to wait patiently at the coffee bar until you received your coffee before doing anything else. With asynchronous JavaScript, you can read the newspaper, find a table, phone a friend, and do multiple other tasks until the barista calls your name, alerting you that your coffee is ready.