# Less than

Updated: 05/01/2023 by Computer Hope

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.

Tip

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.

## 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 Shift while pressing < creates and inserts the less than symbol.

Tip

Doing the Alt code Alt+60 can also create a less than.

### 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?

### Math

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`

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`

### Programming

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";
}```
Tip

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

### HTML

With a markup language like HTML (hypertext markup language), 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>`

### Keyboard shortcut

Some programs may incorporate the less than into keyboard shortcuts. For example, Ctrl+Shift+< is an example of a shortcut that uses the less than key.

## 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 Shift while also pressing <.

## 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`