20 lines
901 B
Markdown
20 lines
901 B
Markdown
---
|
||
title: Use tabindex to Add Keyboard Focus to an Element
|
||
localeTitle: Использование tabindex для добавления фокуса клавиатуры к элементу
|
||
---
|
||
## Использование tabindex для добавления фокуса клавиатуры к элементу
|
||
|
||
Следуя инструкциям:
|
||
|
||
Добавьте атрибут tabindex к тегу p и установите его значение «0».
|
||
|
||
строка 16 \`\` \`CSS
|
||
|
||
Инструкции: заполните всю вашу информацию и нажмите « **Отправить».**
|
||
```
|
||
becomes:
|
||
```css
|
||
<p tabindex="0">Instructions: Fill in ALL your information then click <b>Submit</b></p>
|
||
```
|
||
|
||
Таким образом, он будет получать фокус клавиатуры, когда пользователь наберет страницу. |