Code

Updated: 04/09/2024 by Computer Hope

Code may refer to any of the following:

Computer programming

1. Code (short for source code) describes text written by a computer programmer using a programming language. Examples of programming languages include C, C#, C++, Java, Perl, and PHP (PHP: Hypertext Preprocessor). Code can also be used less formally to refer to text written for markup or styling languages, like HTML (hypertext markup language) and CSS (cascading style sheets). For example, you may see people refer to code in numerous languages, such as "C code," "PHP code," "HTML code," or "CSS code."

An example of C# scripting code that prints "Hello, World!" to the screen is displayed below.

public class HelloWorld
{
 public static void Main()
 {
  System.Console.WriteLine("Hello World!");
 }
}

The next example is Perl scripting code that prints "Hello World!" to the screen.

#!/usr/bin/perl
print "Hello World!\n";

2. In a word processing document, code may refer to the formatting marks that help structure the overall presentation of a document.

3. When writing in HTML, the <code> tag designates that a section of text is computer code.

4. When describing a hardware identification number, a code may refer to a serial or model number. With software, a code refers to an activation code.

5. There are other computer-related terms containing the word "code." Beep code, code 9, country code, and QR code are a few examples.

Tip

See our full list of computer-related terms containing code using our word and letter search.

Codename, Computer abbreviations, Programming terms, Source code