Computer >> Computer tutorials >  >> Programming >> HTML

HTML value Attribute


The HTML value attribute define the initial value of an HTML element in an HTML document. It can be applied to button, input, meter, li, option, progress and param HTML elements.

Syntax

Following is the syntax −

<tagname value=”text”></tagname>

Let us see an example of HTML value Attribute −

Example

<!DOCTYPE html>
<html>
<style>
   body {
      color: #000;
      height: 100vh;
      background-color: #8BC6EC;
      background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
      text-align: center;
   }
</style>
<body>
<h1>HTML value Attribute Demo</h1>
<p>Uploading</p>
<meter min="0" max="100" value="60"></meter>
</body>
</html>

Output

HTML value Attribute