HTML Intro

HTML Intro Quiz

HTML Intro Exercise

HTML Basics

HTML Basic Quiz

HTML Basic Exercise

HTML Advance

HTML Advance Quiz

HTML Advance Exercise

HTML Tags List

HTML Global Attributes

HTML Attributes


HTML onkeypress Attribute

HTML onkeypress Attribute



The onkeypress attribute fires when the user presses a key.


Following events occur when key is pressed:-


  • onkeydown
  • onkeypress
  • onkeyup


Used With:-


Elements Event
All elements in HTML onkeypress




Its syntax is:- < element onkeypress ="your_script" >

Code Explanation

All Tutorials related to HTML Attributes

All Sections related to HTML