HTML Interactive Tags

This article provides a description of interactive tags in HTML as well as examples of their use. So, without further ado, let us get started with a quick introduction, starting with the paragraph that follows this one.

Users are able to interact with interactive tags such as AUDIO (which allows an audio file to be played on an HTML page), VIDEO, and IMG because these tags were created so that users could interact with them.

HTML Interactive Tags List

The various interactive tags available in HTML are outlined in the table that can be found below.

Tags Description
A represents a link in an HTML document.
AUDIO
(if the controls attribute is present)
represents audio and sound streams.
BUTTON represents a push button.
DETAILS provides additional information or control for users.
EMBED represents the plugin content in an HTML document.
IFRAME represents an inline frame.
IMG
(if the usemap attribute is present)
represents an image.
INPUT
(if the type attribute is not in the hidden state)
represents an input control.
KEYGEN represents a control to generate a key pair.
LABEL represents the label for an input tag.
MENU
(if the type attribute is in the toolbar state)
represents a menu list.
OBJECT
(if the usemap attribute is present)
represents an embedded object.
SELECT represents a select list (drop-down list).
TEXTAREA represents a multi-line text input control.
VIDEO
(if the controls attribute is present)
represents videos or movie streams.

HTML Interactive Tags Example

Now is the time to give an example of some of the interactive tags listed in the above table. For example, the "A" tag comes under the category of interactive tags because the user can interact with the content of this tag as shown in the example given below:

HTML Code
<!DOCTYPE html>
<html>
<body>
   
   <p>Visit <A href="https://jobails.com">jobails.com</A></p>

</body>
</html>
Output

Visit jobails.com

If the user clicks on the text "jobails.com," then he or she will be redirected to the URL "https://jobails.com" on the web.

The following example uses the "BUTTON" tag to create a button on the web so that we can perform a particular action when the button is clicked.

HTML Code
<!DOCTYPE html>
<html>
   <head>
      <script>
         function fresherearth() {
            alert("Hey, what's Up?")
         }
      </script>
   </head>
<body>
   
   <button onclick="fresherearth()">Click Me</button>

</body>
</html>
Output

So these are the ways the interactive tags are used on the web. That is, the interactive tags are used to let the user perform some action on the web, and based on the user's action, we perform some action on their behalf.

HTML Online Test


« Previous Tutorial Next Tutorial »