html container code example

Example 1: container in bootstrap

Containers
Containers are the most basic layout element in Bootstrap and are required when using our default grid system. Choose from a responsive, fixed-width container (meaning its max-width changes at each breakpoint) or fluid-width (meaning it’s 100% wide all the time).
While containers can be nested, most layouts do not require a nested container.

Syntax:
<div class="container">
  <!-- Content here -->
</div>

Example 2: div container style

<div class="tab-content col-md-12" 
style="	width:600px;
        box-shadow: 3px 3px 3px 3px grey;
        margin:10px;
        background-color: #E0D8D6;
      ">

Example 3: container js

$(document).ready(function() {
  $('#submit').click(function() {
    var list = ['Car', 'Bike', 'Scooter'];
    for (var value of list) {
      $('#container')
        .append(`<input type="checkbox" id="${value}" name="interest" value="${value}">`)
        .append(`<label for="${value}">${value}</label></div>`)
        .append(`<br>`);
    }
  })
});

Tags:

Html Example