HTML5: How to specify the value of the parameter?

Go to Exercise page


HTML Code:

<!DOCTYPE html><!-- Define document type as HTML5 -->
<html><!-- Start of HTML document -->
<head><!-- Start of head section -->
<meta charset="utf-8"><!-- Define character encoding -->
<title> How to specify the value of 
the parameter</title><!-- Title of the document -->
</head><!-- End of head section -->
<body><!-- Start of body section -->
Parameter Value <!-- Textual content indicating parameter value or description -->
beach.wav"><!-- Define object element with audio data -->
<param name="autoplay" value="true"><!-- Define parameter for object with specified value -->
</object><!-- End of object element -->
</body><!-- End of body section -->
</html><!-- End of HTML document -->


  • This HTML code demonstrates how to specify the value of a parameter 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, which in this case is "autoplay".
  • The value attribute specifies the value of the parameter, which in this case is "true".
  • The text "Parameter Value" before the <object> element seems to provide a description or context for the parameter value being defined.

Live Demo:

See the Pen param-value-answer by w3resource (@w3resource) on CodePen.

See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes Yes

Go to Exercise page

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.

Follow us on Facebook and Twitter for latest update.