HTML Tags -Audio/Video & input
This article will cover a few important HTML Tags.
Audio and video tags
Input tags
Audio and video tags:
Audio Tag:
The audio tag is used to embed sound content in a document, such as music or other audio streams. The audio tag contains one or more tags with different audio sources. The browser will choose the first source it supports. The text between the audio tags will only be displayed in browsers that do not support the element. There are three supported audio formats in HTML: MP3, WAV, and OGG.
Video Tag:
The Video tag is used to embed video content in a document, such as a movie clip or other video streams. The video tag contains one or more tags with different video sources. The browser will choose the first source it supports. The text between the video tags will only be displayed in browsers that do not support the element. There are three supported video formats in HTML: MP4, WebM, and OGG.
Input elements:
Why do we need input elements?
HTML input elements are used to accept user input in a web form. They allow users to interact with a webpage and provide information to the website owner or developer. There are several different types of input elements, each with its own specific purpose and attributes.
1) Text
One of the most commonly used input elements is the text
input, which allows users to enter a single line of text. This input type is often used for fields such as names, addresses, and phone numbers. The text
input element can be customized with the size
and maxlength
attributes to specify the size of the input field and the maximum number of characters that can be entered.
2) Password
Another common input element is the password
input, which is used to accept a password from the user. The password is displayed as a series of asterisks or dots to protect the user's privacy. The password
input element can also be customized with the size
and maxlength
attributes.
3) Radio
The radio
input element is used to create a group of options where only one option can be selected at a time. Each radio
input element is accompanied by a label that describes the option. To ensure that only one option can be selected, all radio
input elements in a group should have the same name
attribute.
4) Check Box
The checkbox
input element is similar to the radio
input, but it allows the user to select multiple options. Each checkbox
input element is also accompanied by a label that describes the option. Like radio
input elements, checkbox
input elements can be customized with the name
attribute to group them together.
5) Select
The select
input element is used to create a drop-down list of options for the user to choose from. The option
element is used to define the individual options in the list. The select
input element can be customized with the size
attribute to specify the number of options that should be displayed at once, and the multiple
attribute to allow the user to select multiple options.
6) File
In addition to these basic input elements, there are also several more specialized input elements available in HTML. These include the file
input element, which allows the user to upload a file to the server.
Subscribe to my newsletter
Read articles from Varun Pratap Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by