<Select> HTML Tag

In this article we will discuss how to create dropdown list in HTML using select tag.
  • 1949

The select tag is used for defining a select list. Under it <option> is included and by using this we can include the no. of option that we can select.

HTML Code:

<html>

<head>

    <title></title>

</head>

<body>

    <select>

        <option value="America">America</option>

        <option value="India">India</option>

        <option value="Pakistan">Pakistan</option>

        <option value="Bhutan">Bhutan</option>

        <option value="Bangladesh">Bangladesh</option>

        <option value="Madrass">Madrass</option>

        <option value="America">America</option>

        <option value="Atlanta">Atlanta</option>

    </select><br>

    <br>

    <br>

    <br>

    <br>

    <br>

    <br>

    <br>

    A dropdownlist will appear from which we can select any option from this.

</body>

</html>

 

Output:

hhhhhhhhhhhhh.jpg

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.