Bootstrap 4 Dropdown Header Tutorial

The .dropdown-header class is used to add headers inside the dropdown menu.

Bootstrap 4 Dropdowns Header Example:

<!DOCTYPE html>
  <title>Bootstrap 4 Example</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <h2>Bootstrap 4 Dropdowns Example</h2>
    <div class="dropdown">
    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
      Dropdown button
    <div class="dropdown-menu">
      <h5 class="dropdown-header">Dropdown header</h5>
      <a class="dropdown-item" href="#">Link 1</a>
      <a class="dropdown-item" href="#">Link 2</a>
      <a class="dropdown-item" href="#">Link 3</a>
      <h5 class="dropdown-header">Dropdown header</h5>
      <a class="dropdown-item" href="#">Another link</a>

Try it:

Bootstrap 4 Example on

Please Share