title: align label and textbox to the center in html
body: <p>I just need to align the textbox and label to the center of the page. I am unable to get this. Every time its left aligned. Please need suggestions
  Html code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;ProjectID Creation&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"&gt;&lt;/script&gt;
      &lt;link href="font.css" rel="stylesheet" /&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="container" style="background-color:dodgerblue"&gt;
  
          &lt;h2&gt;&lt;b&gt;ProjectID Creation&lt;/b&gt;&lt;/h2&gt;
  
          &lt;div class="panel-group" id="accordion"&gt;
              &lt;div class="panel panel-default"&gt;
  
  
                  &lt;div class="panel-body"&gt;
  
  
  
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-4 form-group col-md-4 col-xs-12"&gt;
                                  &lt;div class="form-group"&gt;
  
                                      &lt;label id="label" class="control-label" &gt;UserID:&lt;/label&gt;
                                      &lt;input type="text" class="form-control" name="user" ng-model="user" placeholder="Enter UserID" autocomplete="off" required /&gt;
  
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-4 form-group col-md-4 col-xs-12"&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label id="label" class="control-label"&gt;ProjectID:&lt;/label&gt;
                                      &lt;input type="text" class="form-control" name="project" ng-model="project" placeholder="Enter ProjectID" autocomplete="off" required /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
  
  
                          &lt;/div&gt;
  
  
  
                      &lt;div class="temp123" style="margin-bottom:60px"&gt;
  
                          &lt;button type="submit" class="btn btn-primary" ng-click="create()"&gt;Create&lt;/button&gt;
  
                          &lt;button type="clear" class="btn btn-default" ng-click="clear()"&gt;Clear&lt;/button&gt;
  
                      &lt;/div&gt;
  
  
  
  
  
  
                  &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my code in  <a href="https://jsfiddle.net/055dddmf/" rel="nofollow noreferrer">jsfiddle</a></p>