Computer Code Reference Page

In HTML, we can represent programming code, variables, keyboard input, and system responses using special tags.

Code Examples | Keyboard Input | Variables | System Messages

Code Examples

HTML "Hello World" Program:

<!DOCTYPE html>
<html>
  <body>
    <p>Hello World</p>
  </body>
</html>

C "Hello World" Program:

#include <stdio.h>

int main() {
   printf("Hello, World!");
   return 0;
}

JavaScript "Hello World" Program:

// Prints "Hello, World!" to the developer console
console.log("Hello, World!");

Keyboard Input Examples

To copy text: Ctrl + C

To paste text: Ctrl + V

To save a file: Ctrl + S


Variables in Mathematics

The area of a circle is calculated using the formula: π × r2

The formula for speed is: s = d / t


System Messages

If you type `node` in the terminal and press Enter, you might see:
Welcome to Node.js v18.18.0.

If a file is not found, a program might output:
Error: File not found on disk.


Back to Top