Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
div {
color: purple;
}
</style>
</head>
<body>
<h2>Example of preventing tab indexing</h2>
<p tabindex="1">HTML</p>
<p tabindex="3">CSS</p>
<div tabindex="-1">Prevented tab indexing</div>
<p tabindex="4">Javascript</p>
<p tabindex="2">Git</p>
<p tabindex="5">
Navigate the elements with the "Tab" button.
</p>
</body>
</html>