Computer Code Reference Page

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


Code Examples

HTML Program:




  
    Hello Page
  
  
    

Hello, World!

C Program:


#include <stdio.h>

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

JavaScript Program:


console.log("Hello, World!");
alert("Hello, World!");


Keyboard Input Examples

To copy text: Ctrl + C

To paste text: Ctrl + V

To undo action: Ctrl + Z


Variables in Mathematics

Area of Rectangle = l × w

Speed = distance / time


System Messages

Example 1:

Input: 10 + 20

Output: 30

Example 2:

Command: ls

Output: file1.txt file2.txt code.js


Back to Top