0% found this document useful (0 votes)
8 views5 pages

Question Answer of HTML Audio Form Video

The document contains revision questions and answers on HTML forms, video, and audio elements. It covers topics such as the purpose of HTML forms, types of input fields, how to create dropdown menus, and the use of the <video> and <audio> tags. Additionally, it explains attributes like 'autoplay', 'muted', and 'loop' for multimedia elements.

Uploaded by

bansalananya8885
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

Question Answer of HTML Audio Form Video

The document contains revision questions and answers on HTML forms, video, and audio elements. It covers topics such as the purpose of HTML forms, types of input fields, how to create dropdown menus, and the use of the <video> and <audio> tags. Additionally, it explains attributes like 'autoplay', 'muted', and 'loop' for multimedia elements.

Uploaded by

bansalananya8885
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Class X : Revision Questions

Questions on HTML Forms :

1. What is the purpose of HTML forms?


Ans: The main purpose of html forms is to create a medium of question and answer from the user
also to collect information from the user is the main purpose of html forms. It acts as a medium
between to carry out survey on a online platform for a large number of responses.
2. Write the HTML code to create a simple form.
<html>
<head>
<tittle> HTML FORM
</tittle>
</head>
<body>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
3. What are the different types of form input fields?

The different types of input fields are

• Here are the different types of form input fields:

• Text Input: <input type="text"> - for single-line text input


• Password Input: <input type="password"> - for password input (masked)
• Email Input: <input type="email"> - for email address input
• Number Input: <input type="number"> - for numeric input
• 7. Checkbox Input: <input type="checkbox"> - for multiple-choice input
• 8. Radio Input: <input type="radio"> - for single-choice input
• to user)
• Submit Input: <input type="submit"> - for form submission
• Reset Input: <input type="reset"> - for form reset
• Button Input: <input type="button"> - for custom button

4. How do you create a dropdown menu in an HTML form?


To create a dropdown menu, we need to use the <select> tag
Example:
<select name="options">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>

5. What is the difference between GET and POST methods?


GET:

- Used for retrieving data from the server

- Data is sent in the URL as query strings

- Limited data capacity (max 2048 characters)

- Data is visible in the URL

- Can be cached by the browser

POST:

- Used for sending data to the server for processing

- Data is sent in the request body

- No data capacity limit

- Data is not visible in the URL

- Cannot be cached by the browser

6. Write the HTML code to create a textarea.

<textarea name="textarea" rows="10" cols="30">

Enter your text here...

</textarea>

7. What is the purpose of the "name" attribute in HTML form input fields?
To provide a name is to identify the field when the form is created.
Enable the computer to access the data given by the user
Indirectly the name attribute connects the input fields to the data that’s being sent to the
server for processing
8. Write the HTML code to create a checkbox group.

<form>

<input type="checkbox" id="option1" name="options" value="option1">

<label for="option1">Option 1</label><br>

<input type="checkbox" id="option2" name="options" value="option2">

<label for="option2">Option 2</label><br>

<input type="checkbox" id="option3" name="options" value="option3">

<label for="option3">Option 3</label>

</form>

9. How do you create a radio button group in an HTML form?


<form>
<input type="radio" id="option1" name="options" value="option1">
<label for="option1">Option 1</label><br>

<input type="radio" id="option2" name="options" value="option2">


<label for="option2">Option 2</label><br>

<input type="radio" id="option3" name="options" value="option3">


<label for="option3">Option 3</label>
</form>
10. What is the purpose of the "value" attribute in HTML form input fields?
The "value" attribute in HTML form input fields specifies the default value or the value to be
sent to the server when the form is submitted.
11. Write the HTML code to create a password input field.
<input type="password" id="password" name="password" placeholder="Enter password">
12. How do you create a hidden input field in an HTML form?
<input type="hidden" id="hiddenField" name="hiddenField" value="hiddenValue">
13. Write the different ways to create button in the HTML Form
Here are the different ways to create a button in an HTML form:

1. Submit Button:

<input type="submit" value="Submit">

1. Reset Button:

<input type="reset" value="Reset">

1. Button Element:

<button type="submit">Submit</button>

1. Button Element with Reset Type:

<button type="reset">Reset</button>

1. Button Element with Custom JavaScript Function:

<button onclick="myFunction()">Click me</button>

Questions on Video :

1. What is the purpose of the <video> tag in HTML?


The <video> tag in HTML is used to embed video content into a web page, allowing users to play
and view the video directly within the browser.
2. Write the HTML code to embed a video.
<video width="350" height="250" controls>
<source src ="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
3. Explain the different ways to add a video on HTML Page
Here are the different ways to add a video on an HTML page:

1. Using the <video> tag: Embed a video file directly into the HTML page.

<video src="video.mp4" controls></video>

2. Using the <embed> tag: Embed a video file from an external source.

<embed src="video.mp4" width="320" height="240">

3. Using the <object> tag: Embed a video file from an external source.

<object data="video.mp4" width="320" height="240"></object>

4. Using YouTube or Vimeo iframe: Embed a video from YouTube or Vimeo.

<iframe src="(link unavailable)" width="320" height="240"></iframe>


4. What are the different video formats supported by HTML?
1. MP4 (.mp4)
2. WebM (.webm)
3. Ogg (.ogg)
5. How do you add controls to a video in HTML?
To add controls to a video in HTML, you can use the controls attribute within the <video> tag:
<video src="video.mp4" controls></video>
6. What is the purpose of the "autoplay" attribute in HTML video?
The "autoplay" attribute in HTML video allows the video to play automatically as soon as the page
loads, without requiring user interaction.
7. How do you specify the width and height of a video in HTML?
You can specify the width and height of a video in HTML using the width and height attributes
within the <video> tag:
<video width="640" height="480" src="video.mp4"></video>
8. What is the purpose of the "muted" attribute in HTML video?
The "muted" attribute in HTML video allows the video to play automatically with the audio
muted, preventing sound from playing until the user unmutes it.
9. What is the purpose of the "controls List" attribute in HTML video?
The "controls list" attribute in HTML video allows you to specify which video controls are
displayed, such as "no download" to hide the download button.

Questions on Audio :

1. What is the purpose of the <audio> tag in HTML?


The <audio> tag in HTML is used to embed audio content, such as music or sound effects,
directly into a web page.
2. Write the HTML code to embed an audio file.
<audio controls>
<source src="audio.mp3" type="audio/mp3">
Your browser does not support the audio tag.
</audio>
3. What are the different audio formats supported by HTML?
HTML supports the following audio formats:

1. MP3 (.mp3)
2. WAV (.wav)
3. OGG (.ogg)

4. How do you add controls to an audio file in HTML?

To add controls to an audio file in HTML, use the controls attribute within the <audio> tag:

<audio src="audio.mp3" controls></audio

5. What is the purpose of the "autoplay" attribute in HTML audio?

The "autoplay" attribute in HTML audio allows the audio file to play automatically as soon as the
page loads.

6. How do you make an audio file responsive in HTML?

To make an audio file responsive in HTML, you can add the following attributes:

<audio controls width="100%">

<source src="audio.mp3" type="audio/mp3">

Your browser does not support the audio tag.

</audio>

7. What is the purpose of the "loop" attribute in HTML audio?

The "loop" attribute in HTML audio allows the audio file to play repeatedly, restarting from the
beginning after it finishes.

8. Write the HTML code to add a audio playlist.

<audio controls>

<source src="song1.mp3" type="audio/mp3">

<source src="song2.mp3" type="audio/mp3">

<source src="song3.mp3" type="audio/mp3">

Your browser does not support the audio tag.

</audio>

10. How do you specify the width and height of an audio player in HTML?
To specify the width and height of an audio player in HTML, use the width and height attributes
within the <audio> tag:

<audio controls width="300" height="50"></audio>

You might also like