Use the size attribute to specify the number of visible values:
Live Demo & Try it yourself!
Video is not available... Embedded is previous playlist.
Use the size attribute to specify the number of visible values:
<!DOCTYPE html>
<html>
<body>
<h2>Visible Option Values</h2>
<p>Use the size attribute to specify the number of visible values.</p>
<form action="/php/actionSelect.php" method="post">
<label for="class">Choose your Class:</label>
<select id="class" name="class" size="3">
<option value="6th">6th</option>
<option value="7th">7th</option>
<option value="8th">8th</option>
<option value="9th">9th</option>
<option value="10th">10th</option>
<option value="11th">11th</option>
<option value="12th">12th</option>
</select>
<input type="submit">
</form>
</body>
</html>