Bootstrap Tutorial - Mark label element with control-label








The following code shows how to mark label element with control-label.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-git2.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://getbootstrap.com/assets/css/docs.css">
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
</head><!--   w w  w .ja v a  2 s . c  o  m-->
<body style='margin:30px'>
  <form class="form-horizontal">
    <div class="form-group">
      <label for="inputMonth" class="col-lg-2 control-label">Favorite
        Month</label>
      <div class="col-lg-10">
        <input type="month" class="form-control" id="inputMonth"
          placeholder="">
      </div>
    </div>
  </form>

</body>
</html>

Click to view the demo