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 Program:

<pre>
<code>
<html>
  <body>
    <p>Hello World</p>
</body>
</html>
</code>
</pre>

C program:

<pre>
<code>
#include<stdio.h>
int main(){
 printf("Hello World");
return 0;
}
</code>
</pre>

JavaScript Program:

<pre>
<code>
console.log("Hello World");
</code>
</pre>


Keyboard Input Examples

    To copy text: <kbd>Ctrl</kbd> + <kbd>C<kbd>
    To paste text: <kbd>Ctrl</kbd> + <kbd>v<kbd>
    To save text: <kbd>Ctrl</kbd> + <kbd>s<kbd>
  

Variables in Mathematics

      Area of Circle = π × <var>r2
      Speed = <var>d</var> / <var>t</var>
    

System Messages

  Example 1:
  Input: 5 + 10
  Output: <samp>15<samp> 

  
  Example 2: 
  Command: dir
  Output: <samp>List of files displayed here<samp>
  

Back to top