Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Bad value “” for attribute “tabindex” on element “X”: The empty string is not a valid integer.

The tabindex attribute expects a valid integer value, not an empty string.

This attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key) and determine their relative ordering for sequential focus navigation.

This attribute accepts an integer value, where:

  • A negative value means the element is not reachable via sequential keyboard navigation.
  • A value of 0 means that the element should be focusable in sequential keyboard navigation, after any positive tabindex values. The focus navigation order of these elements is defined by their order in the document source.
  • A positive value means the element should be focusable in sequential keyboard navigation, with its order defined by the value of the number. That is, tabindex="4" is focused before tabindex="5" and tabindex="0", but after tabindex="3".

Learn more:

Related W3C validator issues