التخطي إلى المحتوى الرئيسي

What is Bootstrap?,BootStrap Introduction,Bootstrap tutorial for beginners




Bootstrap is an external library that contains .css file and .js file to provide a responsive web layout. responsive means, Layout which is compatible with Mobile Screen, Desktop Screen, TV Screen, Tablet Screen, Projector, etc.
Bootstrap contain set of CSS block which will be called under HTML element. for example, if we want to create two different partitions which is compatible with all device.
How to use bootstrap:
1)first download bootstrap.min.js and bootstrap.min.css I have mentioned download link below with a complete example.
2) Create .html file and link bootstrap .css file and .js file
3) Write the following code to implement bootstrap
class="row" :-  it create responsive row
class="col":-  it create responsive columns
<div class="row">
<div class="col-sm-6">
</div>
<div class="col-sm-6">
</div>
</div>
Complete Code of bootstrap 
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="bootstrap.min.css">

      <script src="bootstrap.min.js"></script>
      <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="jumbotron text-center">
<h1>Welcome in SHIVA TUTORIALS</h1>
</div>
<div class="container">
<div class="row">
<div class="col-sm-4">
<h3>Column1</h3>
<p>JAVA</p>
<p>dfhgad fhgdhfgsdjhfgsdjhg fjsd gf djhfg dfdg fgdjh fgdjh fgjhad gfhdgfh gdfhgdjhgfdjhgfhadgjhfg djhfg djh fgdh gfhdgfhgdjh fgjhadfgadjh fgd gfhd gfdgjhfg adjh fgjhd gfdh gfhdgfh gdhf gadjh fgjhad gfhadgfhgadjhfg adjhfg adhg fhadg fhad gfhgadjhf gajhfgjha gfasgfh gdjhfgadjh fgasjhgfjhas gas gfjgas jh fgasjh gfasg hadg jhfgd hf gdjh fghd gfhd ghf gdjh fg</p>
</div>
<div class="col-sm-4">
<h3>Column2</h3>
<p>.NET</p>
<p>dfhgad fhgdhfgsdjhfgsdjhg fjsd gf djhfg dfdg fgdjh fgdjh fgjhad gfhdgfh gdfhgdjhgfdjhgfhadgjhfg djhfg djh fgdh gfhdgfhgdjh fgjhadfgadjh fgd gfhd gfdgjhfg adjh fgjhd gfdh gfhdgfh gdhf gadjh fgjhad gfhadgfhgadjhfg adjhfg adhg fhadg fhad gfhgadjhf gajhfgjha gfasgfh gdjhfgadjh fgasjhgfjhas gas gfjgas jh fgasjh gfasg hadg jhfgd hf gdjh fghd gfhd ghf gdjh fg</p>
</div>
<div class="col-sm-4">
<h3>Column3</h3>
<p>PHP</p>
<p>dfhgad fhgdhfgsdjhfgsdjhg fjsd gf djhfg dfdg fgdjh fgdjh fgjhad gfhdgfh gdfhgdjhgfdjhgfhadgjhfg djhfg djh fgdh gfhdgfhgdjh fgjhadfgadjh fgd gfhd gfdgjhfg adjh fgjhd gfdh gfhdgfh gdhf gadjh fgjhad gfhadgfhgadjhfg adjhfg adhg fhadg fhad gfhgadjhf gajhfgjha gfasgfh gdjhfgadjh fgasjhgfjhas gas gfjgas jh fgasjh gfasg hadg jhfgd hf gdjh fghd gfhd ghf gdjh fg</p>
</div>
</div></div>
<div class="jumbotron text-center">
<h1>footer</h1>
</div>
</body>
</html>
For more, you can go

https://github.com/shivaconceptsolution/htmldesign/tree/master/bootstrap
The Bootstrap 4 grid system has five classes:
.col- (extra small devices - screen width less than 576px)
.col-sm- (small devices - screen width equal to or greater than 576px)
.col-md- (medium devices - screen width equal to or greater than 768px)
.col-lg- (large devices - screen width equal to or greater than 992px)
.col-xl- (xlarge devices - screen width equal to or greater than 1200px)
we always prefer sm to define the column width.
<div class="col"></div>
<div class="col-sm-4"></div><div class="col-sm-8">
Text Colors in Bootstrap:-
Bootstrap 4 has some predefined classes that can be used to provide "meaning through colors".
The classes for text colors are: .text-muted, .text-primary, .text-success, .text-info, .text-warning, .text-danger, .text-secondary, .text-white, .text-dark, .text-body (default body color/often black) and .text-light:
<h1 class="text-primary">Why do we use it?</h1>
Background Colors
The classes for background colors are: .bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-secondary, .bg-dark and .bg-light.
<div class="bg-warning"></div> 
when we want to apply more than one class in a single div tag or any HTML  tag.
<div class="col-sm-3 bg-danger text-primary">
............................................................................................................................................................

What is Flex:-
It is special box layout of bootstrap4 which is used to design layout without using the float property.
it provide d-flex class to create a flex layout.
Row-wise:-
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<script type="text/javascript" src="bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="d-flex flex-column p-3">

<div class="p-2 bg-primary">JAVA</div><div class="p-2 bg-secondary">PYTHON</div><div class="p-2 bg-info">PHP</div></div>
</div>
</body>
</html>
Column-wise flex layout:-

<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<script type="text/javascript" src="bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="d-flex flex-column p-3">

<div class="p-2 bg-primary">JAVA</div><div class="p-2 bg-secondary">PYTHON</div><div class="p-2 bg-info">PHP</div></div>
</div>
</body>
</html>
...............................................................................................................................................

Create a menu using the toggler:-

Bootstrap provide class="navbar" and floowing atrribute

<nav class="navbar navbar-expand-md bg-dark navbar-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
    <span class="navbar-toggler-icon"></span>
  </button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
    </ul>
  </div>
</nav>

......................................................................................

The sequence of BootStrap Plugin:-

1) <meta name="viewport" content="width=device-width, initial-scale=1">
2)  bootstrap.min.css
3)   jquery.min.js
4)   popper.min.js
5)  bootstrap.min.js
We always use the offline files.
How to create a slider in bootstrap:-
to create slider we will use carousal property under div.
Complete code to design slider.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.min.css">
  <script src="jquery.min.js"></script>
  <script src="popper.min.js"></script>
  <script src="bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="demo" class="carousel slide bg-danger" data-ride="carousel">
  <!-- Indicators -->
  <ul class="carousel-indicators">
    <li data-target="#demo" data-slide-to="0" class="active"></li>
    <li data-target="#demo" data-slide-to="1"></li>
    <li data-target="#demo" data-slide-to="2"></li>
  </ul>
  <!-- The slideshow -->
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="1.jpg"  width="800" height="400" alt="Los Angeles">
      <div class="carousel-caption">
    <h3>Los Angeles</h3>
    <p>We had such a great time in LA!</p>
  </div>
    </div>
    <div class="carousel-item">
      <img src="2.png"  width="800" height="400" alt="Chicago">
      <div class="carousel-caption">
    <h3>Los Angeles</h3>
    <p>We had such a great time in LA!</p>
  </div>
    </div>
    <div class="carousel-item">
      <img src="3.jpg" width="800" height="400" alt="New York">
      <div class="carousel-caption">
    <h3>Los Angeles</h3>
    <p>We had such a great time in LA!</p>
  </div>
    </div>
  </div>
  <!-- Left and right controls -->
  <a class="carousel-control-prev" href="#demo" data-slide="prev">
    <span class="carousel-control-prev-icon"></span>
  </a>
  <a class="carousel-control-next" href="#demo" data-slide="next">
    <span class="carousel-control-next-icon"></span>
  </a>
</div>
</body>
</html>

تعليقات

إرسال تعليق

POST Answer of Questions and ASK to Doubt

المشاركات الشائعة من هذه المدونة

DSA in C# | Data Structure and Algorithm using C#

  DSA in C# |  Data Structure and Algorithm using C#: Lecture 1: Introduction to Data Structures and Algorithms (1 Hour) 1.1 What are Data Structures? Data Structures are ways to store and organize data so it can be used efficiently. Think of data structures as containers that hold data in a specific format. Types of Data Structures: Primitive Data Structures : These are basic structures built into the language. Example: int , float , char , bool in C#. Example : csharp int age = 25;  // 'age' stores an integer value. bool isStudent = true;  // 'isStudent' stores a boolean value. Non-Primitive Data Structures : These are more complex and are built using primitive types. They are divided into: Linear : Arrays, Lists, Queues, Stacks (data is arranged in a sequence). Non-Linear : Trees, Graphs (data is connected in more complex ways). Example : // Array is a simple linear data structure int[] number...

JSP Page design using Internal CSS

  JSP is used to design the user interface of an application, CSS is used to provide set of properties. Jsp provide proper page template to create user interface of dynamic web application. We can write CSS using three different ways 1)  inline CSS:-   we will write CSS tag under HTML elements <div style="width:200px; height:100px; background-color:green;"></div> 2)  Internal CSS:-  we will write CSS under <style> block. <style type="text/css"> #abc { width:200px;  height:100px;  background-color:green; } </style> <div id="abc"></div> 3) External CSS:-  we will write CSS to create a separate file and link it into HTML Web pages. create a separate file and named it style.css #abc { width:200px;  height:100px;  background-color:green; } go into Jsp page and link style.css <link href="style.css"  type="text/css" rel="stylesheet"   /> <div id="abc"> </div> Exam...

Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025

 Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025 Now a days most of the IT Company asked NODE JS Question mostly in interview. I am creating this article to provide help to all MERN Stack developer , who is in doubt that which type of question can be asked in MERN Stack  then they can learn from this article. I am Shiva Gautam,  I have 15 Years of experience in Multiple IT Technology, I am Founder of Shiva Concept Solution Best Programming Institute with 100% Job placement guarantee. for more information visit  Shiva Concept Solution 1. What is the MERN Stack? Answer : MERN Stack is a full-stack JavaScript framework using MongoDB (database), Express.js (backend framework), React (frontend library), and Node.js (server runtime). It’s popular for building fast, scalable web apps with one language—JavaScript. 2. What is MongoDB, and why use it in MERN? Answer : MongoDB is a NoSQL database that stores data in flexible, JSON-like documents. It...