HTML, CSS, and JavaScript
HTML, CSS, and JavaScript are the three standard programming languages that must be used by any web application to be accessed by a universal web browser. While in the early days of web development you had to write a lot of code in each of these three languages and get them to work together, today there are several frameworks and libraries (such as React, Angular, Flutter, MaterialUI, and TailwindCSS) that enable you to develop feature-rich web apps easier and faster. At their core they still use HTML, CSS, and JavaScript so it is still important to know the basics.
HyperText Markup Language (HTML)
HTML is what is known as a markup language for content to be displayed in a web browser. Web browsers receive files coded in HTML from a web server and render the contents, in the form of web pages with text, images, video, and transaction data, in a layout, as programmed in the HTML code.
Markup Language
A markup language is a system for annotating a document in a way it provides instructions on what is to be done with the text or other content. The idea and terminology evolved from the “marking up” of paper manuscripts (the revision instructions by editors), which is traditionally written with a red or blue pencil on authors’ manuscripts. In digital media, this “blue pencil instruction text” was replaced by tags, which indicate the parts of the document rather than specifying exactly how they should be displayed. It lets authors avoid formatting every instance of the same kind of thing redundantly (and possibly inconsistently). The reader (in this case, the web browser) is the one that decides how content between each tag should be interpreted and rendered. Of course, every browser must have the same interpretation and rendering mechanisms, and that’s what standards are for.
HTML pages comprise multiple elements that are the building blocks of the UI for a web application. Elements can be text, images, video, audio, data input fields, buttons, checkboxes, radio buttons, and other such user interface elements. An element is defined by a tag with an opening and closing tag and the content of the tag in between. Every element has an identifier and can be individually selected and manipulated (for example, to conditionally show and hide elements).
One of the earliest and very widely used features of HTML is known as hyperlinks. Any part of the page (any element such as a word or a sentence or an image) can be tagged so that even if users click on the element, they will be redirected to another page.
HTML pages uses imperative programming and looks very different from declarative programs.
Cascading Style Sheets (CSS)
HTML is interpreted by browsers and displayed based on well-defined standards. However, HTML offers limited capabilities to design the UI for web pages or web applications. Cascading Style Sheets (CSS) is an add-on to HTML that allows UI-specific attributes to be defined for elements, such as font color, size, background colors, borders, and many others.
CSS also supports conditional rules, such that a particular style is applied under a specific condition. For example, you can write HTML and CSS code such that the color of the text changes depending on what the text says (the ‘Success’ status could be displayed in green while the status ‘Failure’ could be displayed in red).
The browser generally has some default rendering logic, which it falls back on if there is no CSS, but the browser’s capability to take rendering decisions is now intentionally kept to a minimum to allow programmers complete flexibility in how their applications should be rendered. Thus, CSS is now almost mandatory for any web application.
JavaScript
JavaScript (often shortened to JS and saved in files with a .js extension) is a lightweight interpreted (or just-in-time compiled) high-level programming language. While it was initially introduced as the scripting language for web pages to enable them to process user input and make dynamic changes to content, today it is also used extensively in backend programming, specifically with its server-side environment known as Node.js.