Element

Updated: 12/30/2021 by Computer Hope

An element may refer to any of the following:

Element logo

1. When describing HTML (hypertext markup language), see our HTML element definition for further information.

2. Elements is used as an abbreviation of Adobe Photoshop Elements.

3. An element is a single part of a larger group. For example, in computer programming an array can contain different elements (index) that can be stored and called upon individually. For example, in the below Perl code the @names array contains five elements (names) and then uses a foreach to say hello to each of the names.

Foreach array example

my @names = ('Neil', 'Geoff', 'Nathan', 'Scott', 'Tim');
foreach (@names) {
 print "Hello $_\n";
}

In the example above, the following output would be printed to the screen.

Hello Neil
Hello Geoff
Hello Nathan
Hello Scott
Hello Tim

This example is one way elements could be added and used in a program. A program could also use an external source such as a file or a database to create a list of elements.

Display element, Programming terms