Sunday 16 November 2014

Drop Down List in Html

Structure of the Problem Requirements 

In this problem we will you make a drop down list in html. To create a down list in html we use <select> tag and for elements which is in Drop down list we use <option> tag. <option> tag open and closed with in option.Here is the source code of this web page which help you in better understanding. 

SOURCE CODE


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>  Drop Down list </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<h1> Drop Down List </h1>
<label> Country: </label>
<select name = "myCountryName" >
<option value= "USA"> USA </option>
<option value= "Pakistan"> Pakistan </option>
<option value= "India"> India </option>
<option value= "Canada"> Canada </option>
<option value= "France"> France </option>
<option value= "Germany"> Germany </option>
<option value= "Italy"> Italy </option>
<option value= "Iran"> Iran </option>
<option value= "UK"> UK </option>
<option value= "Nepal"> Nepal </option>
<option value= "Other"> Other </option>
</select>
</body>
</html>

OUTPUT OF THE PROGRAM


Drop Down list in html
Drop Down list in html

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment