Industry Selection List For HTML, JavaScript, PHP Array


Creating industry selection dropdown for web applications. In this tutorial, you'll find detailed examples of how to implement dropdown menus using HTML, JavaScript, and PHP.

Whether you are developing a user interface for an application or looking to enhance your web forms, our comprehensive code snippets and explanations will help you integrate industry selection features efficiently. Explore the provided HTML structure, JavaScript arrays, and PHP arrays to create dynamic and user-friendly dropdown that fit your needs.

Create Custom Industry List for Your Needs

Customize your preferred industry names by selecting options from the provided table. You can then include these selected names in the dropdown menu, JavaScript array, or PHP array. The codes for the selected industry names will be displayed below.

Multilingual Options. Translated versions of the industry selection list are available in various languages

×
# Name Category Select
1Banking & FinanceBusiness & Finance
2ConsultingBusiness & Finance
3InsuranceBusiness & Finance
4LegalBusiness & Finance
5Marketing & AdvertisingBusiness & Finance
6AccountingBusiness & Finance
7Investment ManagementBusiness & Finance
8HealthcareHealth & Wellness
9PharmaceuticalsHealth & Wellness
10WellnessHealth & Wellness

HTML Drop Down

This HTML code snippet demonstrates how to create a dropdown menu for selecting industries. It utilizes the 'select' element with 'optgroup' and 'option' tags to categorize various industries into groups such as Business & Finance, Health & Wellness, and Technology & IT. Each option is clearly labeled for ease of selection.

HTML
<select id="industry" name="industry">
  <option value="">Please select an industry</option>
  <optgroup label="Business & Finance">
    <option value="banking-finance">Banking & Finance</option>
    <option value="consulting">Consulting</option>
    <option value="insurance">Insurance</option>
    <option value="legal">Legal</option>
    <option value="marketing-advertising">Marketing & Advertising</option>
    <option value="accounting">Accounting</option>
    <option value="investment-management">Investment Management</option>
  </optgroup>
  <optgroup label="Health & Wellness">
    <option value="healthcare">Healthcare</option>
    <option value="pharmaceuticals">Pharmaceuticals</option>
    <option value="wellness">Wellness</option>
    <option value="medical-devices">Medical Devices</option>
    <option value="biotechnology">Biotechnology</option>
  </optgroup>
  <optgroup label="Technology & IT">
    <option value="information-technology">Information Technology</option>
    <option value="software-development">Software Development</option>
    <option value="telecommunications">Telecommunications</option>
    <option value="technology">Technology</option>
    <option value="cybersecurity">Cybersecurity</option>
    <option value="cloud-computing">Cloud Computing</option>
  </optgroup>
  <optgroup label="Creative Industries">
    <option value="arts-culture">Arts & Culture</option>
    <option value="entertainment">Entertainment</option>
    <option value="fashion-apparel">Fashion & Apparel</option>
    <option value="media-publishing">Media & Publishing</option>
    <option value="design">Design</option>
    <option value="advertising">Advertising</option>
  </optgroup>
  <optgroup label="Industrial & Manufacturing">
    <option value="agriculture">Agriculture</option>
    <option value="automotive">Automotive</option>
    <option value="aviation">Aviation</option>
    <option value="construction">Construction</option>
    <option value="energy-utilities">Energy & Utilities</option>
    <option value="manufacturing">Manufacturing</option>
    <option value="mining-metals">Mining & Metals</option>
    <option value="chemicals">Chemicals</option>
    <option value="pulp-paper">Pulp & Paper</option>
  </optgroup>
  <optgroup label="Services & Tourism">
    <option value="education">Education</option>
    <option value="government-public-sector">Government & Public Sector</option>
    <option value="hospitality-tourism">Hospitality & Tourism</option>
    <option value="non-profit">Non-Profit</option>
    <option value="real-estate">Real Estate</option>
    <option value="retail">Retail</option>
    <option value="sports-recreation">Sports & Recreation</option>
    <option value="transportation-logistics">Transportation & Logistics</option>
    <option value="personal-care">Personal Care</option>
    <option value="cleaning-services">Cleaning Services</option>
  </optgroup>
  <optgroup label="Education & Training">
    <option value="primary-secondary-education">Primary & Secondary Education</option>
    <option value="higher-education">Higher Education</option>
    <option value="vocational-training">Vocational Training</option>
    <option value="online-learning">Online Learning</option>
    <option value="educational-services">Educational Services</option>
  </optgroup>
  <optgroup label="Other">
    <option value="defense-security">Defense & Security</option>
    <option value="e-commerce">E-Commerce</option>
    <option value="environmental-services">Environmental Services</option>
    <option value="food-beverage">Food & Beverage</option>
    <option value="gaming">Gaming</option>
    <option value="home-improvement">Home Improvement</option>
    <option value="marine">Marine</option>
    <option value="research-development">Research & Development</option>
    <option value="supply-chain-management">Supply Chain Management</option>
    <option value="consulting">Consulting</option>
    <option value="startups">Startups</option>
    <option value="other">Other</option>
  </optgroup>
</select>

JavaScript Array

JavaScript Array of industries list.

In this JavaScript example, we define an array of objects representing industry categories and options. Each object contains a 'group' key for the industry category and an `options` key, which is an array of objects with 'value' and 'text' keys. This structure allows for dynamic population of dropdown menus and can be used to generate HTML dropdowns programmatically based on the array data.

JavaScript
const industries = [
  {
    category: "Business & Finance",
    options: [
      { value: "banking-finance", text: "Banking & Finance" },
      { value: "consulting", text: "Consulting" },
      { value: "insurance", text: "Insurance" },
      { value: "legal", text: "Legal" },
      { value: "marketing-advertising", text: "Marketing & Advertising" },
      { value: "accounting", text: "Accounting" },
      { value: "investment-management", text: "Investment Management" }
    ]
  },
  {
    category: "Health & Wellness",
    options: [
      { value: "healthcare", text: "Healthcare" },
      { value: "pharmaceuticals", text: "Pharmaceuticals" },
      { value: "wellness", text: "Wellness" },
      { value: "medical-devices", text: "Medical Devices" },
      { value: "biotechnology", text: "Biotechnology" }
    ]
  },
  {
    category: "Technology & IT",
    options: [
      { value: "information-technology", text: "Information Technology" },
      { value: "software-development", text: "Software Development" },
      { value: "telecommunications", text: "Telecommunications" },
      { value: "technology", text: "Technology" },
      { value: "cybersecurity", text: "Cybersecurity" },
      { value: "cloud-computing", text: "Cloud Computing" }
    ]
  },
  {
    category: "Creative Industries",
    options: [
      { value: "arts-culture", text: "Arts & Culture" },
      { value: "entertainment", text: "Entertainment" },
      { value: "fashion-apparel", text: "Fashion & Apparel" },
      { value: "media-publishing", text: "Media & Publishing" },
      { value: "design", text: "Design" },
      { value: "advertising", text: "Advertising" }
    ]
  },
  {
    category: "Industrial & Manufacturing",
    options: [
      { value: "agriculture", text: "Agriculture" },
      { value: "automotive", text: "Automotive" },
      { value: "aviation", text: "Aviation" },
      { value: "construction", text: "Construction" },
      { value: "energy-utilities", text: "Energy & Utilities" },
      { value: "manufacturing", text: "Manufacturing" },
      { value: "mining-metals", text: "Mining & Metals" },
      { value: "chemicals", text: "Chemicals" },
      { value: "pulp-paper", text: "Pulp & Paper" }
    ]
  },
  {
    category: "Services & Tourism",
    options: [
      { value: "education", text: "Education" },
      { value: "government-public-sector", text: "Government & Public Sector" },
      { value: "hospitality-tourism", text: "Hospitality & Tourism" },
      { value: "non-profit", text: "Non-Profit" },
      { value: "real-estate", text: "Real Estate" },
      { value: "retail", text: "Retail" },
      { value: "sports-recreation", text: "Sports & Recreation" },
      { value: "transportation-logistics", text: "Transportation & Logistics" },
      { value: "personal-care", text: "Personal Care" },
      { value: "cleaning-services", text: "Cleaning Services" }
    ]
  },
  {
    category: "Education & Training",
    options: [
      { value: "primary-secondary-education", text: "Primary & Secondary Education" },
      { value: "higher-education", text: "Higher Education" },
      { value: "vocational-training", text: "Vocational Training" },
      { value: "online-learning", text: "Online Learning" },
      { value: "educational-services", text: "Educational Services" }
    ]
  },
  {
    category: "Other",
    options: [
      { value: "defense-security", text: "Defense & Security" },
      { value: "e-commerce", text: "E-Commerce" },
      { value: "environmental-services", text: "Environmental Services" },
      { value: "food-beverage", text: "Food & Beverage" },
      { value: "gaming", text: "Gaming" },
      { value: "home-improvement", text: "Home Improvement" },
      { value: "marine", text: "Marine" },
      { value: "research-development", text: "Research & Development" },
      { value: "supply-chain-management", text: "Supply Chain Management" },
      { value: "consulting", text: "Consulting" },
      { value: "startups", text: "Startups" },
      { value: "other", text: "Other" }
    ]
  }
];

Usage Example

Use this array to create dynamic dropdown menu

HTML
<select id="industry">
  <option value="">Select Industry</option>
</select>
javaScripr
const industrySelect = document.getElementById("industry");
// Populate dropdown
industries.forEach(group => {
    const optgroup = document.createElement("optgroup");
    optgroup.label = group.category;

    group.options.forEach(option => {
        const optionElement = document.createElement("option");
        optionElement.value = option.value;
        optionElement.textContent = option.text;
        optgroup.appendChild(optionElement);
    });

    industrySelect.appendChild(optgroup);
});

Try it your self Real Time Preview

PHP Array

PHP Array of industries

The PHP array example shows how to structure industry options in a server-side environment. The array is organized into groups with each group containing a list of options, where each option has a 'value' and 'text'. This format is useful for generating dynamic dropdowns on the server side, allowing you to easily integrate the industry selection into web applications and forms with PHP.

PHP
<?php
$industries = [
    [
        'category' => 'Business & Finance',
        'options' => [
            ['value' => 'banking-finance', 'text' => 'Banking & Finance'],
            ['value' => 'consulting', 'text' => 'Consulting'],
            ['value' => 'insurance', 'text' => 'Insurance'],
            ['value' => 'legal', 'text' => 'Legal'],
            ['value' => 'marketing-advertising', 'text' => 'Marketing & Advertising'],
            ['value' => 'accounting', 'text' => 'Accounting'],
            ['value' => 'investment-management', 'text' => 'Investment Management']
        ]
    ],
    [
        'category' => 'Health & Wellness',
        'options' => [
            ['value' => 'healthcare', 'text' => 'Healthcare'],
            ['value' => 'pharmaceuticals', 'text' => 'Pharmaceuticals'],
            ['value' => 'wellness', 'text' => 'Wellness'],
            ['value' => 'medical-devices', 'text' => 'Medical Devices'],
            ['value' => 'biotechnology', 'text' => 'Biotechnology']
        ]
    ],
    [
        'category' => 'Technology & IT',
        'options' => [
            ['value' => 'information-technology', 'text' => 'Information Technology'],
            ['value' => 'software-development', 'text' => 'Software Development'],
            ['value' => 'telecommunications', 'text' => 'Telecommunications'],
            ['value' => 'technology', 'text' => 'Technology'],
            ['value' => 'cybersecurity', 'text' => 'Cybersecurity'],
            ['value' => 'cloud-computing', 'text' => 'Cloud Computing']
        ]
    ],
    [
        'category' => 'Creative Industries',
        'options' => [
            ['value' => 'arts-culture', 'text' => 'Arts & Culture'],
            ['value' => 'entertainment', 'text' => 'Entertainment'],
            ['value' => 'fashion-apparel', 'text' => 'Fashion & Apparel'],
            ['value' => 'media-publishing', 'text' => 'Media & Publishing'],
            ['value' => 'design', 'text' => 'Design'],
            ['value' => 'advertising', 'text' => 'Advertising']
        ]
    ],
    [
        'category' => 'Industrial & Manufacturing',
        'options' => [
            ['value' => 'agriculture', 'text' => 'Agriculture'],
            ['value' => 'automotive', 'text' => 'Automotive'],
            ['value' => 'aviation', 'text' => 'Aviation'],
            ['value' => 'construction', 'text' => 'Construction'],
            ['value' => 'energy-utilities', 'text' => 'Energy & Utilities'],
            ['value' => 'manufacturing', 'text' => 'Manufacturing'],
            ['value' => 'mining-metals', 'text' => 'Mining & Metals'],
            ['value' => 'chemicals', 'text' => 'Chemicals'],
            ['value' => 'pulp-paper', 'text' => 'Pulp & Paper']
        ]
    ],
    [
        'category' => 'Services & Tourism',
        'options' => [
            ['value' => 'education', 'text' => 'Education'],
            ['value' => 'government-public-sector', 'text' => 'Government & Public Sector'],
            ['value' => 'hospitality-tourism', 'text' => 'Hospitality & Tourism'],
            ['value' => 'non-profit', 'text' => 'Non-Profit'],
            ['value' => 'real-estate', 'text' => 'Real Estate'],
            ['value' => 'retail', 'text' => 'Retail'],
            ['value' => 'sports-recreation', 'text' => 'Sports & Recreation'],
            ['value' => 'transportation-logistics', 'text' => 'Transportation & Logistics'],
            ['value' => 'personal-care', 'text' => 'Personal Care'],
            ['value' => 'cleaning-services', 'text' => 'Cleaning Services']
        ]
    ],
    [
        'category' => 'Education & Training',
        'options' => [
            ['value' => 'primary-secondary-education', 'text' => 'Primary & Secondary Education'],
            ['value' => 'higher-education', 'text' => 'Higher Education'],
            ['value' => 'vocational-training', 'text' => 'Vocational Training'],
            ['value' => 'online-learning', 'text' => 'Online Learning'],
            ['value' => 'educational-services', 'text' => 'Educational Services']
        ]
    ],
    [
        'category' => 'Other',
        'options' => [
            ['value' => 'defense-security', 'text' => 'Defense & Security'],
            ['value' => 'e-commerce', 'text' => 'E-Commerce'],
            ['value' => 'environmental-services', 'text' => 'Environmental Services'],
            ['value' => 'food-beverage', 'text' => 'Food & Beverage'],
            ['value' => 'gaming', 'text' => 'Gaming'],
            ['value' => 'home-improvement', 'text' => 'Home Improvement'],
            ['value' => 'marine', 'text' => 'Marine'],
            ['value' => 'research-development', 'text' => 'Research & Development'],
            ['value' => 'supply-chain-management', 'text' => 'Supply Chain Management'],
            ['value' => 'consulting', 'text' => 'Consulting'],
            ['value' => 'startups', 'text' => 'Startups'],
            ['value' => 'other', 'text' => 'Other']
        ]
    ]
];
?>

Usage Example PHP Array

Here is a quick example of how you might use this array to generate an HTML select option

PHP
<?php
$selectOption = '';
// create dropdown
foreach ($industries as $group) {
    $selectOption .= '<optgroup label="' . htmlspecialchars($group['category']) . '">'.PHP_EOL;

    foreach ($group['options'] as $option) {
        $value = strtolower($option['value']);
        $text = htmlspecialchars($option['text']);
        $selectOption .= '<option value="' . $value . '">' . $text . '</option>'.PHP_EOL;
    }

    $selectOption .= '</optgroup>'.PHP_EOL;
}
?>

<select id="industry">
  <?php echo $selectOption ?>
</select>

Use Cases

The industry selection code snippets are useful in many web development situations. Here are some common uses:

  • Survey and questionnaire design

  • Job Application Forms

  • Market Research Surveys

  • Business Directory Listings

  • E-commerce Platforms