Focus

In computer terminology, focus means to select an element within a user interface. When an item is "focused," it can be controlled using keyboard input. For example, clicking within a search box on a webpage focuses the field, allowing you to enter text.

Focused text fields often display a visual indicator, such as an outline or halo. In the example below, the Name field is focused within the web form.

Web form with focused name field

Web form with focused "Name" field

Web browsers allow you to press the Tab key to cycle through focusable elements on a page. While text fields are focused by default, web developers can make other items focusable, including links, buttons, and other elements. It is also possible to choose the "tab order" of these items using the tabindex HTML attribute. The element assigned to tabindex=0 is focused when the user presses Tab, followed by tabindex=1, tabindex=2, etc.

Accessibility

Focusing items is essential for users with accessibility needs. Most browsers only focus form fields, but ones with assistive technology allow users to focus other elements, such as links and buttons. For example, tabbing to a link within the page content and pressing Enter is the same as clicking the link. This technology enables users to navigate webpages without using a mouse.

Updated October 16, 2021

Definitions by TechTerms.com

The definition of Focus on this page is an original TechTerms.com definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about the Focus definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.