Bootstrap Tutorial - Create UL list group








The following code shows how to create UL list group.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src="maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<style type='text/css'>
@import url('http://getbootstrap.com/dist/css/bootstrap.css');
<!--  w  w  w . j a  v a  2  s  .  co  m-->
ol li.list-group-item {
  list-style: decimal inside;
  display: list-item;
}
</style>
</head>
<body>
  <div class="container">
    <div class="panel panel-default">
      <div class="panel-heading">Test</div>
      <ol class="list-group">
        <li class="list-group-item">Item 1</li>
        <li class="list-group-item">Item 2</li>
      </ol>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading">Unordered Test</div>
      <ul class="list-group">
        <li class="list-group-item">Item</li>
        <li class="list-group-item">Another Item</li>
      </ul>
    </div>
  </div>
</body>
</html>

Click to view the demo