HTML5: How to define a parameter for an object?
Solution:
HTML Code:
Explanation:
- This HTML code demonstrates how to define parameters for an object element, particularly for embedding audio content.
- The <object> element is used to embed an external resource, in this case, an audio file specified by the data attribute.
- Inside the <object> element, a <param> element is used to define parameters for the embedded object.
- The name attribute specifies the name of the parameter, and the value attribute specifies its value.
- In this example, the autoplay parameter is set to true, indicating that the audio should start playing automatically when the page loads.
- The text "Parameter" before the <object> element seems to provide a description or context for the parameter being defined.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.