JavaScript
HTML
CSS
jQuery
PHP
SQL
WordPress
Example of Using JavaScript
// place text in the #my_output element
document.getElementById('my_output').innerHTML = 'Hello World';
Note
Although JavaScript is a programming language, it's built into every browser, and there is no need to download/install anything extra to use it.
Note
When using JavaScript, single or double quotation marks are acceptable and work identically to one another. Choose whichever you prefer, and stay consistent. However, if you are writing a string to the page that contains either a double or single quote, you will need to either use the opposite set, or place a backslash prior to the quote.
document.getElementById('my_output').innerHTML = "Johnny's World"; or document.getElementById('my_output').innerHTML = 'Johnny/'s World';
Linking to an External Document
An external JavaScript file (or multiple files) are used to define the various site actions, while keeping everything centralized. This is a best practice because if you were to place your scripts directly in the head of each document (or scattered throughout the body), there would be no centralized location to make your changes and you’d have to search for all the various rules across multiple locations.
The following shows the head of our document, and how the link should be placed.
Advanced HTML Template
Non-crucial scripts can be placed just before the closing /body
tag which can speed up the page load time because the page can first render before applying the scripts.