- HTML Course
- HTML Tutorial
- HTML Document Structure
- HTML Root Tags
- HTML Flow Tags
- HTML Interactive Tags
- HTML Basic Tags
- HTML Paragraph
- HTML Line Break
- HTML Horizontal Line
- HTML Images
- HTML Data Types
- HTML Attributes
- HTML Character Entities
- HTML Styles
- HTML Formatting Text
- HTML Logical Style Text
- HTML Organizing Text
- HTML List
- HTML Tables
- HTML Forms
- HTML action Attribute
- HTML Multimedia
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:
<!DOCTYPE html> <html> <body> <p>Visit <A href="https://codescracker.com">codescracker.com</A></p> </body> </html>
Visit codescracker.com
If the user clicks on the text "codescracker.com," then he or she will be redirected to the URL "https://codescracker.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.
<!DOCTYPE html> <html> <head> <script> function codescracker() { alert("Hey, what's Up?") } </script> </head> <body> <button onclick="codescracker()">Click Me</button> </body> </html>
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.
« Previous Tutorial Next Tutorial »