block select text html code example

Example 1: placeholder select html

<!DOCTYPE html>
<head>
</head>
<body>
  <select name="food">
    <!-- The following line makes a placeholder -->
    <option value="" disabled selected hidden>select food</option>
    <option value="apple">apple</option>
    <option value="melon">melon</option>
  </select>
</body>

Example 2: min length input html

<form action="/action_page.php">
  <label for="password">Password:</label>
  <input type="password" id="password" name="password" minlength="8"><br><br>
  <input type="submit" value="Submit">
</form>

Tags:

Html Example