Less than

Updated: 05/16/2020 by Computer Hope
Less than

Alternatively known as an angle bracket, the less than is a symbol ( < ) found on all computer keyboards, commonly the same key as the comma. The less than symbol resembles an arrow pointing to the left and is commonly used in math and computer programming.


The wide edge of the less than symbol always faces to the larger number. For example, with 1 < 5, you know one is less than five.

Where is the less than on the keyboard?

Below is an overview of a computer keyboard with the less than key highlighted in blue.

Less than key

How to create a less than

Creating the < symbol on a U.S. keyboard

On English PC and Mac keyboards, the less than is on the same key as the comma. Pressing and holding down the Shift key while pressing the less than key creates the less than symbol.

Creating the < symbol on a smartphone or tablet

To create a less than symbol on a smartphone or tablet, open the keyboard, go into the numbers (123), then (#+=) or symbols (sym) section, and tap the < symbol.

What is a less than used for on a computer?

Below is an example of how the less than could be used in math. In the example below, the statement is showing that 2 is less than 10.

2 < 10
Negative and positive numbers on a scale.

When working with negative numbers, the negative number farthest away from zero is less than the other negative number. For example, in the example below, the -7 is less than -3 because it's farther away from zero.

-7 < -3

If you're working with a negative number and a positive number, the negative number is always less than the positive number.

-1 < 10

Below is an example of how the less than could be used in computer programming. In this example, the if statement is performed if the variable $myvalue is less than 100. If the variable was greater than 100, this section of code would be skipped.

if ($myvalue < 100) {
 print "Less than 100.\n";

In the above example, if you wanted to start matching at "100" and not "99" (because 100 is not less than 100) you'd type "<=" which indicates less than or equal to the value.

With a markup language like HTML, the less than is used as an opening to a tag. For example, in the following code, the less than is used to start the opening and closing paragraph tag.

<p>Example of a paragraph.</p>

What is the other symbol on the less than key?

On U.S. keyboards, the less than key is shared with the comma key, which may be shown next to or below the less than symbol. To create the less than, hold down the Shift key while also pressing the less than key.

How do I type a less than in HTML?

Because the less than symbol is used to create HTML tags, it cannot be used in text without causing errors. To create a less than in HTML use either the entity number &#60; or entity name &lt; in your code. For example, using the below code shows "10 < 100" in the text.

10 &lt; 100

Greater than, Keyboard terms, Less than or equal to