FrontEnd Web Tech Upto Bootstrap Jan 2025 - DONE
FrontEnd Web Tech Upto Bootstrap Jan 2025 - DONE
Contents
Chapter-1: HTML
Round-1: Basic Tags
1. Introduction to HTML
2. Demonstrates the tags - <html>, <head>, <title>, <body>, <h1>, <h2>, <h6>, <b>, <i>, <br>, <u>
3. Demonstrates the tags - <!--> , <center>, some attributes of <body> tag
4. Demonstrates the attribute – background
5. Demonstrates the tag - <img>
6. Demonstrates the tags - <marquee>
7. Demonstrates the tags - <font>
8. Demonstrates the tags - <ol>, <ul>
9. Demonstrates -  
10. Demonstrates the tags - <pre>
11. Demonstrates the tags - <p>
12. Demonstrates the tags - <hr>, <acronym>
Round-2: Tables
1. Introduction to Tables
2. Demonstrates the tag - <table>
3. Demonstrates the attributes – colspan, rowspan
Round-3: Links/Hyperlinks
1. Introduction to Hyperlinks
2. Demonstrates the 1st type of link
3. Demonstrates the 2nd type of link
4. Demonstrates the 3rd type of link
Round-4: Frames
1. Introduction to HTML Frames
2. Demo on creating HTML Frames
Chapter-2: HTML5
Round-1: <input> tag
1. “color” type
2. “date” type
3. “time” type
4. “email” type
5. “month” type
6. in “file” type “multiple” attribute
7. “number” type
8. “placeholder” attribute
9. “range” type
Introduction to HTML
What is HTML?
It is like a set of instructions that tells a web browser how to display content. Imagine it as the
skeleton of a webpage. It structures everything from text, images, and links to the overall layout,
margins, colors etc.
HTML uses tags (enclosed in angle brackets like <tag>) to define different elements and their
properties. For instance, <h1> tags define a heading, <p> tags create paragraphs, <img> tags display
images, <table> tag displays data in rows and columns, and so on.
When you visit a website, the server sends a HTML page to your browser, then the browser reads the
HTML code/tags and shows you the page based on those instructions.
Some Points:
• No HTML – No Website
• It is the elementary thing for every web page
• 80% of world software uses HTML
• Easiest in the Software field
• Invented by Tim Berners Lee – 1993
• It is a presentation language used to describe the appearance of a web document
• It is a tag based language
Eg: <html> <body> <a>
• It is used to create static web pages
Static web page: Here the user cannot send any data/input to the server and the content is
same/fixed for all.
Dynamic web page: Here the user can send any data/input to the server. Usually
by means of form/ application submission. Dynamic content can be client side - created using
Javascript or server-side - created using Java/PHP/NodeJS/Python etc.
Program1: Demonstrates the tags - <html>, <head>, <title>, <body>, <h1>, <h2>, <h6>, <b>, <i>, <br>,
<u>
<html>
<head>
<title> 1st program </title>
</head>
<body>
</body>
</html>
Program2: Demonstrates the tags - <!--> , <center>, some attributes of <body> tag
<html>
<head>
<title> 2nd program </title>
</head>
<body bgcolor = “gold” text = “blue” topmargin = “100”>
</body>
</html>
<html>
<head>
<title> 3rd program </title>
</body>
</html>
Note:
<!-- the path can be:
internet URL: the copy the image address
a image in the current working directory: just give the file name
somewhere in our computer: mention the full path -->
<html>
<body>
</body>
</html>
<html>
<body bgcolor = “yellow”>
</body>
</html>
<html>
<body bgcolor = “wheat”>
</body>
</html>
<html>
<body>
<br/><br/><br/>
</body>
</html>
<html>
</body>
</html>
<html>
<body bgcolor = “lightgreen”>
<pre>
word1 word2
word3
word4
word5
</pre>
</body>
</html>
<html>
<body bgcolor = “lightgreen”>
This is a paragraph1
<p/>
This is a paragraph2
<p/>
This is a paragraph3
</body>
</html>
<html>
<body bgcolor = “lightgreen”>
</body>
</html>
Introduction to Tables
Examples of websites where data is arranged in the form of rows and columns
https://www.indianrail.gov.in/enquiry/TBIS/TrainBetweenImportantStations.html
https://en.wikipedia.org/wiki/2011_Census_of_India
https://www.educationworld.in/educationworld-india-private-universities-rankings/
<html>
<body>
<html>
<center>
<tr>
<td>C++
<td>10th Dec
<td>5pm to 6pm
<td>45Hours
<td>1 Hour/day
<td>1500
<td>Open
</tr>
<tr>
<td>JSE
<td>26th Dec
<td>6pm to 7:30pm
<td>70Hours
<td>1 ½ Hour/day
<td>2850
<td>Close
</tr>
<tr>
<td>C
<td>5th Nov
<td>7:30pm to 8:30pm
</table>
</center>
</body>
</html>
Note: Use <thead> and <tbody> to group heading rows and data rows eg: to set any common style for
multiple rows in one go.
Introduction to Hyperlinks
HTML hyperlinks are elements that allow users to navigate between web pages or different sections
within the same page by clicking on text or images, defined using the <a> tag and specifying the
destination URL with the href attribute.
<html>
<body bgcolor = “silver”>
<h2>
Sachin Tendulkar <br>
Rajnikanth <br>
Amithab Bachchan
</h2>
</body>
</html>
<h2>
</body>
</html>
<html>
<body bgcolor = “tan”>
<h2>
<a href = “#sachin”> sachin </a> <br>
<a href = “#rajnikanth”> chiru </a> <br>
<a href = “#amithab”> amithab </a> <br>
</h2>
<ul>
<li>150+ test matches
<li> 400+ one day matches
<li> 11000 + test runs
<li> 16000 + one day runs
<li> 39 centuries in tests
<li> 42 centuries in one day matches
<li> 89 half centuries in one day matches
<li> highest number of man of the match awards(56) in ODIs
<li> Only player to score a century in all three of his Ranji Trophy,
Duleep Trophy and Irani Trophy debuts at the age of 15
<li> Player of the tournament in 2003 world cup
<li> Wisden cricketer of the year – 1997
</ul>
<ul>
<li>Basha
<li>Narasimha
<ul>
<li>Don
<li>Namak Halal
<li>Sholay
<li>Black
<li>Toophan
<li>Agnipath
</ul>
</body>
</html>
Step1: create a file page4.html which contains three references – sachin, chiru and amithab
<h2>
<a href = “page4.html#sachin”> sachin </a> <br>
<a href = “page4.html#rajni”> rajnikanth </a> <br>
<a href = “page4.html#amithab”> amithab </a> <br>
</h2>
</body>
</html>
They allowed developers to divide a web page into multiple sections, each capable of loading a
separate HTML document.
https://www.w3schools.com/php/
https://www.tutorialspoint.com/java/
http://www.java2s.com/
</frameset>
</body>
</html>
</body>
</html>
<ul>
<li><a href = “c.html” target = “f2”>C</a>
<li><a href = “cpp.html” target = “f2”>C++</a>
<li><a href = “java.html” target = “f2”>Java</a>
</ul>
</body>
</html>
<html>
<body>
<form action="page1.jsp">
Select your favorite color: <input type="color" name="favcolor"><br>
<input type="submit">
</form>
</body>
</html>
Note: In Google Chrome, Press Ctrl + o to open “file open dialog box” to select a local html file
<form action="page1.jsp">
Birthday: <input type="date" name="bday">
<input type="submit">
</form>
<form action="page1.jsp">
Birthday (date and time): <input type="time" name="bdaytime">
<input type="submit">
</form>
<form action="page1.jsp">
E-mail: <input type="email" name="email">
<input type="submit">
</form>
<html>
<body>
<form action="demo_form.asp">
Select images: <input type="file" name="img" multiple accept="image/png, image/jpeg">
<input type="submit">
</form>
<p>Try selecting more than one file when browsing for files.</p>
<!-- In the File upload box itself it doesn't show anything other than png and jpeg files -->
</body>
</html>
<form action="page1.jsp">
Quantity (between 1 and 5): <input type="number" name="quantity" min="1" max="5">
<input type="submit">
</form>
<form action="page1.jsp">
<input type="text" name="fname" placeholder="First name"><br>
<input type="text" name="lname" placeholder="Last name"><br>
<input type="submit" value="Submit">
</form>
<form action="page1.jsp">
Enter username: <input type="text" name="usrname" required>
<input type="submit">
</form>
<!DOCTYPE html>
<html>
<body>
<video controls="true">
<source src="videoplayback1.mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<audio controls="true">
<source src="pillaa.mp3">
Your browser does not support the audio element.
</audio>
</body>
</html>
Contents
Chapter-1: CSS
Round-1: Introduction to CSS
1. Introduction to CSS
2. Applying CSS
3. Selectors, Properties, and Values
4. CSS Ex1 - Internal Styles
5. CSS Ex2 - The id selector
6. CSS Ex3 - The class selector
7. text on Image – inline CSS
8. large font size
9. Demo on External Style Sheets
Introduction to CSS
The main advantage of CSS is to maintain consistency of styles for the HTML elements. Also,
maintenance becomes easy because we just need to modify at one place, it would affect all the
relevant HTML elements.
The first CSS specification to become an official W3C Recommendation is CSS level 1, published on 17
December 1996. Håkon Wium Lie and Bert Bos are credited as the original developers.
Applying CSS
There are three ways to apply CSS to HTML: In-line, internal, and external.
• Inline: An inline style may be used to apply a unique style for a single element.
• Internal/Embedded: styles are used for the whole page. Inside the head element, the style tags
surround all the styles for the page.
• External: External styles are used for the whole website. Here we create a separate CSS file and
link it with other .html and jsp pages
As HTML has tags, CSS has selectors. Selectors are the names given to styles in internal and external
style sheets
For each selector there are “properties” inside curly brackets, which simply take the form of words
such as color, font-weight or background-color.
A “value” is given to the property following a “colon” and each property-value pair is separated by a
“semi-colon”
Eg:
body
{
background-color: silver;
font-size: 20px;
color: gold;
}
</head>
<body>
<h1>This is Heading1</h1>
<p>This is paragraph1</p>
<h1>This is Heading2</h1>
<p>This is paragraph2</p>
</body>
</html>
<html>
<head>
<style type="text/css">
#para1
{
text-align:center;
color:red;
}
<body>
<p id="para1">Hello World!</p>
<p>This paragraph is not affected by the style.</p>
</body>
</html>
Note: It is used to specify a style for a group of elements. Unlike the id selector, the class selector is
most often used on several elements.
<html>
<head>
<style type="text/css">
.center
{
text-align:center;
}
</style>
</head>
<body>
<h1 class="center">Center-aligned heading</h1>
<p class="center">Center-aligned paragraph.</p>
</body>
</html>
<HTML>
<BODY>
<img src="teddy.jpg">
</BODY>
</HTML>
<HTML>
<BODY>
</BODY>
</HTML>
p
{
font-size: xx-large;
color:blue;
}
h2
{
color: red;
text-align: right;
}
<html>
<head>
<link href="usStyles.css" rel="stylesheet" />
</head>
<body>
<h1>This is 6b</h1>
<p>This is para</p>
<h3>This is h3</h3>
<h2>This is h2</h2>
</body>
</html>
<html>
<head>
<link href="usStyles.css" rel="stylesheet" />
<h1>This is 6b</h1>
<p>This is para</p>
<h3>This is h3</h3>
<h2>This is h2</h2>
</body>
</html>
<html>
<head>
<style>
#top
{
background-color: ghostwhite;
color:green;
}
#top h1
{
color: red;
}
#top #datapro
{
background-color: pink;
}
#top p
{
color: blue;
font-weight: bold;
}
</style>
</head>
<body>
<div id="top">
<h1>Chocolate curry</h1>
<p>This is my recipe for making curry purely with chocolate</p>
<p>Mmm mm mmmmm</p>
<h3>USA - Florida and Connecticut</h3>
<h4>USA - Texas</h4>
<h4 id="datapro">USA - Dallas</h4>
<h4>USA - Michigan</h4>
</div>
<hr/>
<h1>The End</h1>
</body>
</html>
Note: There is a small difference between putting a set of elements inside <div> and applying styles
and without putting them inside <div> and just using same class name for them. If we don’t use <div>
then there would be some gaps between elements eg: <h1> and next <h1> (background would be
<body>’s background color)
Grouping: You can give the same properties to a number of selectors without having to repeat them.
<html>
<head>
<style>
p, h1, h2
{
color: blue;
text-align: right;
background-color: silver;
}
</style>
</head>
<body>
<p>This is Para</p>
<h1>This is Heading1</h1>
<h2>This is Heading2</h2>
<h3>This is Heading3</h3>
<html>
<head>
<style>
#x, #y
{
color: blue;
font-size: x-large;
background-color: aliceblue;
}
</style>
</head>
<body>
<h2>This is Heading1</h1>
<h2>This is Heading3</h2>
</body>
</html>
Margin and padding are the two most commonly used properties for spacing-out elements. A margin is
the space outside something, whereas padding is the space inside something. The four sides of an
element can also be set individually: margin-top, margin-right, margin-bottom, margin-left, padding-
top, padding-right, padding-bottom and padding-left
Borders
border-width sets the width of the border, most commonly using pixels as a value. There are also
properties for border-top-width, border-right-width, border-bottom-width and border-left-width.
<html>
<head>
<style>
h2 {
border-style: dashed;
border-width: 3px;
border-left-width: 10px;
border-right-width: 10px;
border-color: red;
}
</style>
</head>
<body>
<h2>India</h2>
<h2>Germany</h2>
</body>
</html>
<html>
<head>
<style>
h2 {
font-size: 1.5em;
background-color: #ccc;
margin: 20px;
padding: 40px;
}
</style>
</head>
<body>
<h2>India</h2>
<h2>Germany</h2>
</body>
</html>
<html>
<head>
<style>
/* to change the anchor tag link color */
a:link{
color:red;
}
a:hover {
background-color: yellow;
}
h2:hover{
background-color: deeppink;
}
</style>
</head>
<body>
<h2>Hello</h2>
<!--Note:
The :hover selector style links on mouse-over
Tip: The :hover selector can be used on all elements, not only on links.-->
</body>
</html>
<html>
<head>
<style>
h1:hover, h2:hover, a:hover
{
background-color: yellow;
}
</style>
</body>
</html>
Prerequisite:
• Any Programming language like C, Python
• OOP like C++, Java, Python
• HTML
Contents
Round-1: Introduction to Javascript
1. What is Javascript
2. When is Javascript used?
3. Other technologies which use Javascript
4. Program: To display an alert box
5. Program: To display current date & time
6. Program: To on/off a light
7. Program: Demo on setInterval()
8. Program: Demo on setTimeout()
What is Javascript
• Javascript is a programming language for the web.
• JavaScript is programming code that can be inserted into HTML pages.
• JavaScript code can be executed by all modern web browsers.
It is a JavaScript standard meant to ensure the interoperability of web pages across different web
browsers.
Examples:
Ex5:
</body>
</html>
Output:
<html>
<head>
<script type="text/javascript">
function displayDate()
{
var element = document.getElementById("cricket");
element.innerHTML= Date();
}
</script>
</head>
<body>
<p id="cricket">Cricket</p>
<p id = "tennis">Tennis</p>
</body>
</html>
Output:
<html>
<head>
<script type="text/javascript">
function displayDate()
{
var h2elements = document.getElementsByTagName("h2");
for (var i = 0; i < h2elements.length ; i++)
{
h2elements[i].innerHTML = Date();
}
}
</script>
</head>
<body>
<p>This is Para1</p>
<p>This is Para2</p>
<h2>This is Heading1</h2>
<h2>This is Heading2</h2>
</body>
</html>
Output:
<html>
<body>
<script>
function changeImage()
{
element=document.getElementById('myimage');
}
</script>
<center>
<img id="myimage" onclick="changeImage()" src="bulb_off.jpg" width="100" height="180">
</body>
</html>
<script>
function myFun2()
{
alert("Hello");
}
function myFun1()
{
setInterval(myFun2 ,3000);
}
</script>
</body>
</html>
Step1.
Output:
<body>
</form>
</body>
</html>
<html>
<head>
<script language="javascript" src="validation.js">
</script>
<!--
<script type="text/javascript" src="validation.js">
</script> -->
</head>
<body>
<table border="0">
<tr>
<td>Username:</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Email ID:</td>
<td><input type="text" name="email" size="50"></td>
</tr>
<tr>
<td>Mobile:</td>
<td><input type="text" value="+91" size="3" readonly>
<input type="text" name="mobile" size="10" maxlength="10"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="pwd1"></td>
</tr>
<tr>
<td>Confirm Password:</td>
<td><input type="password" name="pwd2"></td>
</tr>
</table>
<p/>
<input type="submit" value="Register">
function myCheckEmail(email)
{
var at = "@";
var dot = ".";
return true;
}
function myCheckMobile(mobile)
{
if( isNaN(mobile.value) || mobile.value.length < 10)
{
alert("not a valid mobile number");
mobile.focus();
return false;
}
return true;
}
//email
var x = myCheckEmail(email);
if( x == false)
return false;
//mobile
var y = myCheckMobile(mobile);
if( y == false)
return false;
//pwd1
if( pwd1.value.length < 6)
{
alert("password must be atleast 6 characters long");
pwd1.value = "";
pwd1.focus();
return false;
}
//pwd2
if( pwd1.value != pwd2.value)
{
alert("passwords must match");
pwd2.value = "";
pwd2.focus();
return false;
}
return true;
}
<html>
<head>
<script type="text/javascript">
function myValidateForm(college)
{
for(var i = 0; i< college.length; i++)
{
if(college[i].checked)
return true;
}
</script>
</head>
<body>
<p/>
<input type="submit" value="submit">
</form>
</body>
</html>
Note: JavaScript ES6 (also known as ECMAScript 2015 or ECMAScript 6) is the newer version of
JavaScript that was introduced in 2015.
ES6 provides a new way of declaring a variable by using the let keyword. The let keyword is similar to
the var keyword, except that the variables it declares are block-scoped
Step1.
Note: For the following command to work, 1st install Node.js on your computer. Then:
node letEx1.js
After correction:
Step1.
Step1.
Output:
Step1.
BVRAJU DATAPRO COMPUTERS 55
Step2. Run the program
Step1.
Note:
The JavaScript for/of statement loops through the values of an iterable objects.
Step1.
Output:
Step1.
Output:
Note: Template literals (template strings) allow you to use strings or embedded expressions in the
form of a string. They are enclosed in backticks (``)
Step1.
Old way:
console.log("Hello " + sname + "!, Welcome to " + location + ". Your Monthly Salary is: " + salary );
Note: In old style, we had put so many double quotation marks, and use so many “+” also for
concatenation.
Note:
The rest parameter (...) allows a function to treat an indefinite number of arguments as an array
Step1.
Step2.
Output:
Step1.
Output:
Step1.
Output
Step1.
Output:
Step1.
Output:
Step1.
Output:
Program: ES6 Collections – Maps Ex3 – Iterating over Map Keys, Map Values and Map Keys-Values
Step1.
Output:
Program: ES6 Collections – Maps Ex4 – Removing elements, checking presence, accessing a particular
element & Map size
Step1.
Output:
Step1.
Output:
Step1.
Output:
BVRAJU DATAPRO COMPUTERS 65
Program: De-structuring Assignment
Before ES6:
Step1.
Output:
From ES6:
Output:
Program: Array.find()
Note: The find() method returns the value of the first array element that passes a test function.
Step1.
Note: In this example, the myFun() gets invoked 5 times because there are 5 elements in the array.
Output:
Program: Array.findIndex()
Note:
The findIndex() method returns the index of the first array element that passes a test function.
Step1.
Step1.
Output:
Step1.
Output:
Program: Creating ES6 Classes, constructor, creating instances and invoking methods
Step1.
Output:
Step1.
Output:
Step1.
Note:
The other way to define a class is with a class expression. Class expressions can be named or unnamed.
Step1.
Output:
Step1.
Output:
Step1.
Output:
Step1.
Output:
Step1.
class Shape{
draw(){
console.log("Shape-draw")
}
function myFun(x){
x.draw();
}
for(s of arr){
myFun(s);
}
Output:
Step1.
constructor(width, height){
super();
//Must call super constructor in derived class before accessing 'this'
this.width = width;
this.height = height;
}
//method overriding
area(){
return this.width * this.height;
}
}
constructor(radius){
super();
this.radius = radius;
}
//method overriding
area(){
return 3.14 * this.radius * this.radius;
}
}
constructor(base, height){
super();
this.base = base;
this.height = height;
}
//method overriding
area(){
function myFun(x){
if(x instanceof Rectangle)
console.log("Area of Rectangle with width and height: " + x.width + ", " + x.height);
else if( x instanceof Circle)
console.log("Area of Circle with radius:" + x.radius)
else if(x instanceof Triangle)
console.log("Area of Triangle with base and height:" + x.base + ", " + x.height)
console.log(x.area());
}
for(s of arr){
myFun(s);
}
Output:
Introduction
Ex1:
Ex2:
What is DOM
In other words: The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
Program: Change the content (the innerHTML) of the <p> element with id="demo"
If you want to access any element in an HTML page, you always start with accessing the document
object.
Note: Notice that the <script> tag is not inside the <head> tag. So, it gets executed along with other
elements inside the <body> without waiting for any event to happen.
Note:
document.getElementsByTagName("tagname");
Step2. Open File Explorer and navigate to the file location and double click on the file
Step1.
<html>
<body>
<script>
document.getElementById("img1").src = "https://www.carlogos.org/review-images/new-bmw-
cars-of-2021.jpg";
</script>
</body>
</html>
Note: Notice that the code inside the <script> is not inside any function block. So, it gets executed as
soon as we open the page
Output:
Step1.
Output:
DOM Navigation
Step1.
BVRAJU DATAPRO COMPUTERS 85
<html>
<body>
<script>
document.getElementById("id3").innerHTML = document.getElementById("id2").innerHTML;
document.getElementById("id4").innerHTML = document.getElementById("id1").firstChild.nodeValue;
document.getElementById("id5").innerHTML = document.getElementById("id1").childNodes[0].nodeValue;
</script>
</body>
</html>
Output:
Contents
Round-1: Introduction to jQuery
1. What is jQuery
2. There are lots of other JavaScript frameworks out there
3. Biggest companies on the Web use jQuery, such as
4. The jQuery library contains the following features
5. Prerequisite for using jQuery
6. Software required / adding jQuery to Your Web Pages
7. jQuery Syntax
Round-4: jQuery UI
1. DatePicker Ex1: Select a date from a popup or inline calendar
2. DatePicker Ex2 (formatting the date)
What is jQuery
• Google
• Microsoft
• IBM
• HTML
• CSS
• JavaScript
There are multiple ways to start using jQuery on our web site. We can:
Method1:
We may rename it to something else eg: RajuJQuery1.js or leave the default name: jquery-2.0.3.js
Place the downloaded file in the same directory as the pages where you wish to use it.
Method2:
Alternatives to Downloading
If you don't want to download and host jQuery yourself, you can include it from a CDN (Content
Delivery Network).
jQuery Syntax
The jQuery syntax is tailor made for selecting HTML elements and performing some action on the
element(s).
Basic syntax is: $(selector).action()
• A $ sign to define/access jQuery
• A (selector) to "query (or find)" HTML elements
• A jQuery action() to be performed on the element(s)
<html>
<head>
<title></title>
<script type="text/javascript">
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
</body>
</html>
<script type="text/javascript">
function bye()
{
$(this).hide();
}
function hai()
{
$("p").click(bye);
}
$(document).ready(hai);
</script>
• This will run the function that we pass to .ready() once the document is ready.
(i)
<script type="text/javascript">
$(document).ready(function()
{
$("p").click(function() {
$(this).hide(); //which ever “p” element we click, only that element would be hidden
});
});
</script>
<body>
<p>If you click on me, I will disappear</p>
</body>
(ii)
<script type="text/javascript">
$(document).ready(function()
{
$("p").click(function() {
$("p").hide(); //which ever “p” element we click, all “p” elements would be hidden
});
});
</script>
<body>
<p>If you click on me, I will disappear</p>
</body>
(iii)
<script type="text/javascript">
$(document).ready(function()
{
$("p").click(function() {
$("h2").hide(); //which ever “p” element we click, “h2” element would be hidden
});
});
</script>
<body>
<p>If you click on me, I will disappear</p>
</body>
<html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
<html>
<head>
<title></title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function()
{
$("p").click(function() //The element( here: <p> ) Selector
{
$(this).hide(); // current element Selector
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear2.</p>
</body>
</html>
<html>
<head>
<title></title>
<script type="text/javascript">
$(document).ready(function()
{
$("p").click(function() //The element( here: <p> ) Selector
{
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear3.</p>
</body>
</html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#test").hide(); //id selector
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p id="test">This is another paragraph.</p>
<button>Click me</button>
</body>
<html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$(".test").hide(); //class selector
});
<html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("p").dblclick(function(){
$(this).hide();
});
});
</script>
</head>
<body>
</body>
</html>
<html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("#p1").mouseenter(function(){
alert("You entered p1!");
});
</body>
</html>
<html>
<head>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<p>If you click on the "Hide" button, I will disappear.</p>
<button id="hide">Hide</button>
<button id="show">Show</button>
</body>
</html>
<html>
<head>
</head>
<body>
<button>Toggle</button>
<p>This is a paragraph with little content.</p>
<p>This is another small paragraph.</p>
</body>
</html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("div").animate({height:300},"slow"); //1st argument: CSS property , 2nd argument: duration
$("div").animate({width:300},"slow");
$("div").animate({height:100},"slow");
$("div").animate({width:100},"slow");
});
});
</script>
</head>
<body>
<button>Start Animation</button>
<br /><br />
<div style="background:#ff0000;height:100px;width:100px"> Hello
</div>
</body>
</html>
<html>
<head>
<script>
$(document).ready(function(){
$(".btn1").click(function(){
$("p").animate({fontSize: "3em"}, "slow"); //or in px
});
$(".btn2").click(function(){
$("p").animate({fontSize:"1em", "fast"});
});
});
</script>
</head>
<body>
<button class="btn1">Animate</button>
<button class="btn2">Reset</button>
<p>This is a paragraph.</p>
</body>
</html>
Program13. Fading
<html>
<head>
<title></title>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("div").fadeTo("slow",0.25); // try with fadeTo("slow",0);
});
});
</script>
</head>
<body>
<div style="background:yellow;width:300px;height:300px">
<button>Click to Fade</button>
</div>
</body>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").hide("slow",function(){
alert("The paragraph is now hidden");
});
});
});
</script>
</head>
<body>
<button>Hide</button>
<p>This is a paragraph with little content.</p>
</body>
</html>
• Until now we have been writing jQuery statements one at a time (one after the other).
• However, there is a technique called chaining, that allows us to run multiple jQuery commands,
one after the other, on the same element(s).
• This way, browsers do not have to find the same element(s) more than once.
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function()
{
$("button").click(function(){
$("#p1").css("color","red").slideUp(2000).slideDown(2000);
<body>
</body>
</html>
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function()
{
$("button").click(function(){
$("#p1").css("color","blue");
$("#p1").slideUp(2000);
$("#p1").slideDown(2000);
});
});
</script>
</head>
<body>
</body>
</html>
• One very important part of jQuery is the possibility to manipulate the DOM (Document Object
Model).
• The DOM defines a standard for accessing HTML and XML documents:
• "The W3C Document Object Model (DOM) is a platform and language-neutral interface that
allows programs and scripts to dynamically access and update the content, structure, and style
of a document."
• jQuery comes with a bunch of DOM related methods that make it easy to access and
manipulate elements and attributes.
Program18. To get content with the jQuery text() and html() methods
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function()
{
$("#btn1").click(function()
{
alert("Text: " + $("#test").text()); //note that for <p> element the id is “test”
});
$("#btn2").click(function(){
alert("HTML: " + $("#test").html());
});
}
);
</script>
</head>
<body>
<p id="test">This is some <b>bold</b> text in a paragraph.</p>
<button id="btn1">Show Text</button>
<button id="btn2">Show HTML</button>
</body>
</html>
Program19. To get the value of an input field with the jQuery val() method
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<body>
<p>Name: <input type="text" id="test"></p>
<button>Show Value</button>
</body>
</html>
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
alert($("#mvp").attr("href"));
});
});
</script>
</head>
<body>
<p><a href="http://www.datapro.in" id="mvp">Datapro.in</a></p>
<button>Show href Value</button>
</body>
</html>
Program21. To set content with the jQuery text(), html(), and val() methods
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function()
{
$("#btn1").click(function(){
$("#btn2").click(function(){
$("#test2").html("<b>Anybody Loves to work at Google</b>");
});
$("#btn3").click(function(){
$("#test3").val("Avatar");
});
});
</script>
</head>
<body>
<p id="test1">This is a paragraph.</p>
<p id="test2">This is another paragraph.</p>
<p>Input field: <input type="text" id="test3" value="Godzilla"></p>
<button id="btn1">Set Text</button>
<button id="btn2">Set HTML</button>
<button id="btn3">Set Value</button>
</body>
</html>
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("#btn1").click(function(){
$("img").before("<b>Before</b>");
});
$("#btn2").click(function(){
$("img").after("<i>After</i>");
});
});
</script>
</head>
<body>
<img src="myImages/jquery_logo.gif" alt="jQuery Logo" width="100" height="140">
<br><br>
<html>
<script type="text/javascript" src="RajuJQuery1.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").append(" <b>Doctors Colony</b>.");
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").remove();
});
});
</script>
</head>
<body>
</div>
<br>
<button>Remove div element</button>
</body>
</html>
<html>
<head>
<script src="RajuJQuery1.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("h1,h2,p").addClass("blue");
$("div").addClass("important");
});
});
</script>
<style type="text/css">
.important
{
font-weight:bold;
font-size:xx-large;
}
.blue
{
color:blue;
}
</style>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<div>This is some important text!</div>
<br>
<button>Add classes to elements</button>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
Traversing:
Query traversing, which means "move through", are used to "find" (or select) HTML elements based on
their relation to other elements. Start with one selection and move through that selection until you
reach the elements you desire.
What is jQuery UI
jQuery UI is a widget and interaction library built on top of the jQuery JavaScript Library that you can
use to build highly interactive web applications.
Open: http://jqueryui.com/
We’ll need to include these three files on any page to use the jQuery UI widgets and interactions:
All the above three files are available inside the extracted folder
Step2. Copy the jquery ui (extracted folder) into the web pages node
It should be as follows:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
BVRAJU DATAPRO COMPUTERS 110
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#date").datepicker({numberOfMonths: 4}); //default is 1 month
$("#button1").click(function()
{
$("span").text($("#date").val() );
});
});
</script>
</head>
<body>
<p/>
<input type="button" value="Show Date" id = "button1">
<p/>
Selected Date is:
<span></span>
</body>
</html>
<html>
<head>
<script type="text/javascript">
$(document).ready(function()
{
$("#date").datepicker();
$( "#format" ).change(function() {
$( "#date" ).datepicker( "option", "dateFormat", $( this ).val() );
});
$("#button1").click(function()
{
$("span").text($("#date").val() );
});
</script>
</head>
<body>
<p/>
<input type="button" value="Show Date" id = "button1">
<p>Format options:<br>
<select id="format">
<option value="mm/dd/yy">Default - mm/dd/yy</option>
<option value="yy-mm-dd">ISO 8601 - yy-mm-dd</option>
<option value="d M, y">Short - d M, y</option>
<option value="d MM, y">Medium - d MM, y</option>
<option value="DD, d MM, yy">Full - DD, d MM, yy</option>
<option value="'day' d 'of' MM 'in the year' yy">With
text - 'day' d 'of' MM 'in the year' yy</option>
</select>
</p>
<p/>
Selected Date is:
<span></span>
</body>
</html>
<html>
<head>
<style>
div
/* Just to add some color to our boxes */
{
padding:5px;
width:150px;
height:100px;
text-align:center;
}
#bouncy1 {
background-color:#FFEE88;
}
#bouncy2 {
background-color:#EE88FF;
}
#bouncy3 {
background-color:#EE8888;
}
#bouncy4 {
background-color:#88EEFF;
}
</style>
<script>
$(function(){
$('#bouncy2').click(function () {
$('#bouncy3').click(function () {
$(this).effect("bounce", { direction:'right', times:2 }, 1000);
});
$('#bouncy4').click(function () {
$(this).effect("bounce", { direction:'down', times:2 }, 1000);
});
<body>
<!--
Our Goal will be to create a HTML page that has 4 boxes (DIVs).
Clicking each of these boxes will bounce them is a particular direction.
We can control the direction as well as the speed of bouncing element with arguments to the
method of jQuery.
-->
<table>
<tr>
<td><div id="bouncy1">Click here to bounce. Direction: Up</div></td>
<td><div id="bouncy2">Click here to bounce. Direction: Left</div></td>
</tr>
<tr>
<td><div id="bouncy3">Click here to bounce. Direction: Right</div></td>
<td><div id="bouncy4">Click here to bounce. Direction: Down</div></td>
</tr>
</table>
<br/>
<input id="bounceAll" type="button" value="Click Me to Bounce All!"/>
</body>
</html>
Program4. jQuery UI widget – Accordion: Displays collapsible content panels for presenting
information in a limited amount of space
<html>
<head>
<meta charset="utf-8" />
<title>jQuery UI Accordion - Default functionality</title>
V Imp. Note: The order of <script> elements is important. jQuery library should be included before
jQuery UI library.
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
</head>
<body>
<div id="accordion">
<h3>Dennis Ritchie</h3>
<div>
<p>
Dennis MacAlistair Ritchie was an American computer scientist who "helped shape the digital
era."
He created the C programming language and, with long-time colleague Ken Thompson, the
Unix operating system.
</p>
</div>
<h3>Bjarne Stroustrup</h3>
<div>
<p>
Bjarne Stroustrup is a Danish computer scientist, most notable for the creation and the
development of
the widely used C++ programming language
</p>
</div>
<h3>James Gosling</h3>
<div>
<p>
James Arthur Gosling, is a Canadian computer scientist, best known as the father of the Java
programming language.
</p>
</div>
</body>
</html>
Program5. Tabs Demo: A single content area with multiple panels, each associated with a header in a
list
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Tabs - Default functionality</title>
<script>
$(function() {
$( "#myTabs" ).tabs();
});
//We can see this affect in the webpage:
//http://www.oracle.com/technetwork/java/javase/documentation/index.html
</script>
</head>
<body>
<div id="myTabs">
<ul>
<li><a href="#tabs-1">Tab1</a></li>
<li><a href="#tabs-2">Tab2</a></li>
<li><a href="#tabs-3">Tab3</a></li>
</ul>
<div id="tabs-1">
<p>This is content of Tab1</p>
</div>
<div id="tabs-2">
<p>This is content of Tab2</p>
<!--
The tabs themselves must be in either an ordered (<ol>) or unordered (<ul>) list
Each tab "title" must be inside of a list item (<li>) and wrapped by an anchor (<a>) with an href
attribute
Each tab panel may be any valid element but it must have an id which corresponds to the hash(#) in
the anchor(<a>) of the associated tab.
-->
Contents
Round-1: Introduction to Bootstrap
1. What is Bootstrap
2. Advantages of Bootstrap / Why use Bootstrap
3. How to use Bootstrap
4. Program: Creating 1st web page with Bootstrap
5. Program: full width container
6. Bootstrap Grid System
7. Grid Classes
8. Program: Three Equal Columns
9. Program: Two unequal columns
10. Program: Two Equal Columns
11. Program: Creating Responsive Layout with Bootstrap
Round-2: Typography
1. Program: <abbr>
2. Program: Contextual colors
3. Program: Contextual Backgrounds
4. Program: Pre Scrollable
5. Program: <kbd>
Round-3: Tables
1. Stripped Rows
2. Hover Rows
3. Contextual classes
4. Reponsive tables
Round-4
1. Jumbotron
2. Program: Jumbotron inside container
3. Program: Jumbotron outside container
4. Program: Wells
5. Program: Alerts
6. Program: Glyphicons
7. Program: Badges
Round-6
1. Program: Tabs
2. Program: Breadcrumbs
3. Program: Creating Models with Bootstrap
Round-8: Advanced
1. Program: Bootstrap Input Groups
2. Program: Media Objects – Ex1
3. Program: Media Objects – Ex2 – Nesting Media Objects
4. Program: Carousel Ex1
5. Program: Carousel Ex2 – Adding captions to slides
What is Bootstrap
Bootstrap is a powerful front-end framework for faster and easier web development. It includes HTML
and CSS based design templates for common user interface components like Typography, Forms,
Buttons, Tables, Navigations, Dropdowns, Alerts, Modals, Tabs, Accordion, Carousel and many other as
well as optional JavaScript extensions.
• Mobile First Approach: Meaning that almost everything has been redesigned to start from a
lower screen size and scale up. With the mobile-first approach you can decide which one is the
most important part of the content that you want your users to see when browsing your
website on small devices such as phones. Now they come with fluid design and you don't have
to worry about upcoming screen sizes and resolutions. Your design will flow and look great on
every device.
• Browser Support: It is supported by latest versions of all popular web browsers
• Easy to get started
• Responsive Design: Bootstrap's responsive CSS adjusts to Desktops, Tablets and Mobiles
• It contains beautiful and functional built-in components which are easy to customize
• It is free
• It is open source
Step1. Go to www.getbootstrap.com
Step2. Create a web project using NetBeans IDE, copy paste the unzipped folder to the “Web Pages”
node:
Step1.
Go to https://getbootstrap.com/
Program1: Creating 1st web page with Bootstrap - This example shows the code for a basic Bootstrap
page (with a responsive fixed width container)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
</body>
</html>
Output:
Output:
Note:
Bootstrap grid system provides the quick and easy way to create responsive website layouts. As
opposed to the previous Bootstrap 2.x grid system which is fixed by default, the new version, i.e.
Bootstrap 3 introduces the responsive mobile first fluid grid system that appropriately scales up to 12
columns as the device or viewport size increases.
The following example shows how to get a three equal-width columns starting at tablets and scaling to
large desktops. On mobile phones, the columns will automatically stack
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<h1>Hello World!</h1>
<p>Resize the browser window to see the effect.</p>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-3" style="background-color:lavender;">one</div>
<div class="col-sm-12 col-md-6 col-lg-3" style="background-color:lavenderblush;">two</div>
<!--
</div>
</body>
</html>
Output
Case1:
Case2:
Case3:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<h1>Hello World!</h1>
<p>Resize the browser window to see the effect.</p>
<div class="row">
<div class="col-sm-12 col-md-4 col-lg-4" style="background-color:lavender;">.col-sm-4</div>
<div class="col-sm-12 col-md-8 col-lg-8" style="background-color:lavenderblush;">.col-sm-
8</div>
</div>
</div>
</body>
</html>
Output:
Case1:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 3 Responsive Layout Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>
</head>
<body>
<div class="container">
<div class="row">
</div>
</body>
Output
Case1:
Case2:
Case3:
Program1: <abbr>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>Abbreviations</h1>
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<div class="container">
<h2>Contextual Colors</h2>
<p>Use the contextual classes to provide "meaning through colors":</p>
<p class="text-muted">This text is muted.</p>
<p class="text-primary">This text is important.</p>
<p class="text-success">This text indicates success.</p>
<p class="text-info">This text represents some information.</p>
<p class="text-warning">This text represents a warning.</p>
<p class="text-danger">This text represents danger.</p>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container">
<h2>Contextual Backgrounds</h2>
<p>Use the contextual background classes to provide "meaning through colors":</p>
<p class="bg-primary">This text is important.</p>
<p class="bg-success">This text indicates success.</p>
<p class="bg-info">This text represents some information.</p>
<p class="bg-warning">This text represents a warning.</p>
<p class="bg-danger">This text represents danger.</p>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<p>If you add the .pre-scrollable class, the pre element gets a max-height of 350px and provides a y-
axis scrollbar:</p>
<pre class="pre-scrollable" style="max-height: 500px">
“When I stand before God at the end of my life, I would hope that I
would not have a single bit of talent left and could say, I used everything you gave me.”
“Luck is a dividend of sweat. The more you sweat, the luckier you get.”
</pre>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>Keyboard Inputs</h1>
<p>To indicate input that is typically entered via the keyboard, use the kbd element:</p>
<p>Use <kbd>ctrl + p</kbd> to open the Print dialog box.</p>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Striped Rows</h2>
<p>The .table-striped class adds zebra-stripes to a table:</p>
<table class="table table-striped"> <!-- Grouping two classes-->
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Mary</td>
<td>Moe</td>
<td>[email protected]</td>
</tr>
<tr>
<td>July</td>
<td>Dooley</td>
<td>[email protected]</td>
</tr>
</tbody>
</body>
</html>
Output:
<body>
<div class="container">
<h2>Hover Rows</h2>
<p>The .table-hover class enables a hover state on table rows:</p>
<table class="table table-hover">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Mary</td>
<td>Moe</td>
<td>[email protected]</td>
</tr>
<tr>
<td>July</td>
</body>
Output:
<body>
<div class="container">
<h2>Contextual Classes</h2>
<p>Contextual classes can be used to color table rows or table cells. The classes that can be used
are: .active, .success, .info, .warning, and .danger.</p>
<table class="table">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default</td>
<td>Defaultson</td>
<td>[email protected]</td>
</tr>
<tr class="success">
<td>Success</td>
<td>Doe</td>
</body>
Output:
<div class="container">
<h2>Table</h2>
<p>The .table-responsive class creates a responsive table which will scroll horizontally on small
devices (under 768px). When viewing on anything larger than 768px wide, there is no difference:</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>City</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Anna</td>
<td>Pitt</td>
<td>35</td>
<td>New York</td>
<td>USA</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
Output:
Case1:
Jumbotron
Note: A jumbotron indicates a big box for calling extra attention to some special content or
information.
A jumbotron is displayed as a grey box with rounded corners. It also enlarges the font sizes of the text
inside it.
Note: Place the jumbotron inside the <div class="container"> if you want the jumbotron to NOT extend
to the edge of the screen:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Bootstrap Tutorial</h1>
<p>Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive,
mobile-first projects on the web.</p>
</div>
<p>This is some text.</p>
<p>This is another text.</p>
</div>
</body>
</html>
Output:
Note: Place the jumbotron outside the <div class="container"> if you want the jumbotron to extend to
the screen edges:
<body>
<div class="jumbotron">
<h1>Bootstrap Tutorial</h1>
<p>Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive,
mobile-first projects on the web.</p>
</div>
<div class="container">
<p>This is some text.</p>
<p>This is another text.</p>
</div>
</body>
Output:
Note: The .well class adds a rounded border around an element with a gray background color and
some padding
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Well Size</h2>
<div class="well well-sm">Small Well</div>
<div class="well">Normal Well</div>
<div class="well well-lg">Large Well</div>
</div>
</body>
</html>
Output:
Program4: Alerts
<!DOCTYPE html>
<div class="container">
<h2>Alerts</h2>
<div class="alert alert-success">
<strong>Success!</strong> This alert box could indicate a successful or positive action.
</div>
<div class="alert alert-info">
<strong>Info!</strong> This alert box could indicate a neutral informative change or action.
</div>
<div class="alert alert-warning">
<strong>Warning!</strong> This alert box could indicate a warning that might need attention.
</div>
<div class="alert alert-danger">
<strong>Danger!</strong> This alert box could indicate a dangerous or potentially negative action.
</div>
</div>
</body>
</html>
Output:
Program5: Glyphicons
Note:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Glyphicon Examples</h2>
<p>Envelope icon: <span class="glyphicon glyphicon-envelope"></span></p>
<p>Envelope icon as a link:
<a href="#"><span class="glyphicon glyphicon-envelope"></span></a>
</p>
<p>Search icon: <span class="glyphicon glyphicon-search"></span></p>
<p>Search icon on a button:
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span> Search
</button>
</p>
<p>Search icon on a styled button:
<button type="button" class="btn btn-info">
<span class="glyphicon glyphicon-search"></span> Search
</body>
</html>
Output:
Program6: Badges
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
BVRAJU DATAPRO COMPUTERS 151
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Badges</h2>
<a href="#">News <span class="badge">5</span></a><br>
<a href="#">Comments <span class="badge">10</span></a><br>
<a href="#">Updates <span class="badge">2</span></a>
</div>
</body>
</html>
Output:
Program7: Progress bars (useful for online compilers, online converters etc)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Striped Progress Bars</h2>
<p>The .progress-bar-striped class adds stripes to the progress bars:</p>
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-striped" style="width:40%">
</body>
</html>
Output:
<body>
<div class="container">
<h2>Animated Progress Bar</h2>
<p>The .active class animates the progress bar:</p>
<div class="progress">
<div class="progress-bar progress-bar-striped active" style="width:40%">
40%
</body>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Pagination</h2>
<p>The .pagination class provides pagination links:</p>
<ul class="pagination">
<li><a href="#">1</a></li>
<li class="active"><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
</ul>
</div>
</body>
</html>
Program10: Pager
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Pager</h2>
<p>The .pager class provides previous and next buttons (links):</p>
<ul class="pager">
<li><a href="#">Previous</a></li>
<li><a href="#">Next</a></li>
<!--
<li><a href="https://www.gitam.edu/">Previous</a></li>
<li><a href="http://vmccollege.edu.in/">Next</a></li>
-->
</ul>
</div>
</body>
</html>
Output:
Note: Collapsibles are useful when you want to hide and show large amount of content
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Simple Collapsible</h2>
<p>Click on the button to toggle between showing and hiding content.</p>
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Simple
collapsible</button>
<div id="demo" class="collapse">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Collapsible Panel</h2>
<p>Click on the collapsible panel to open and close it.</p>
<div class="panel-group"> <!-- would be useful when we have multiple panels-->
</div>
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
BVRAJU DATAPRO COMPUTERS 159
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Collapsible List Group</h2>
<p>Click on the collapsible panel to open and close it.</p>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapse1">Collapsible list group</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse">
<ul class="list-group">
<li class="list-group-item">One</li>
<li class="list-group-item">Two</li>
<li class="list-group-item">Three</li>
</ul>
<div class="panel-footer">Footer</div>
</div>
</div>
</div>
</div>
</body>
</html>
Output:
Note: Use the data-parent attribute to make sure that all collapsible elements under the specified
parent will be closed when one of the collapsible items is shown.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Accordion Example</h2>
<p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all
collapsible elements under the specified parent will be closed when one of the collapsible item is
shown.</p>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse1">Collapsible Group 1</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse in">
<div class="panel-body">Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
</div>
</div>
<div class="panel panel-default">
</body>
</html>
Output:
Program1: Tabs
Note:
To make the tabs toggleable, add the data-toggle="tab" attribute to each link. Then add a .tab-pane class
with a unique ID for every tab and wrap them inside a <div> element with class .tab-content.
If you want the tabs to fade in and out when clicking on them, add the .fade class to .tab-pane:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Dynamic Tabs</h2>
<p>To make the tabs toggleable, add the data-toggle="tab" attribute to each link. Then add a .tab-
pane class with a unique ID for every tab and wrap them inside a div element with class .tab-
content.</p>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<h3>HOME</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.</p>
</div>
<div id="menu1" class="tab-pane fade">
</body>
</html>
Output:
Program: Breadcrumbs
Note:
A breadcrumb is a navigation scheme that indicates current page's location to the user within a website
or application. Breadcrumb navigation can greatly enhance the accessibility of the websites having a
large number of pages.
Ex1:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style type="text/css">
.bs-example{
margin: 20px;
}
</style>
</head>
<body>
<div class="bs-example">
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li class="active">Accessories</li>
</ul>
</div>
</body>
</html>
Output:
Note:
Modals are basically a dialog box that is used to provide important information to the user or prompt
user to take necessary actions before moving on. Modal windows are widely used to warn users for
situations like session time out or to receive their final confirmation before going to perform any
critical actions such as saving or deleting important data.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#myModal").modal('show');
});
</script>
</head>
<body>
</body>
</html>
Output:
Note: Make sure that if you are using Bootstrap5 version links then we must be using Bootstrap5
classes which are slightly different from Bootstrap 3 classes
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
<!-- navbar-light: Sets the navbar text and components to use a light color scheme, making them
suitable for light backgrounds.
bg-light: Applies a light gray background color to the navbar. -->
</body>
</html>
Output:
This line: Ensures a responsive design, meaning the webpage adjusts seamlessly to different screen
sizes.
name="viewport":
This specifies that the metadata is related to the viewport, which is the visible area of a
webpage on a screen.
content="width=device-width, initial-scale=1":
width=device-width:
Ensures that the width of the viewport matches the screen's width, whether it's
a mobile, tablet, or desktop screen. This prevents the page from being too wide
and requiring horizontal scrolling.
initial-scale=1:
Sets the initial zoom level of the page to 1, meaning the content is displayed at
its default size (100% zoom).
• The webpage may not scale to fit the device's screen width, leading to parts of the content
being cut off.
• Users may need to scroll horizontally to view the entire page, which is inconvenient.
Note:
The <nav> tag does not have a default visual style. It works as a structural and semantic container.
Screen readers use the <nav> tag to identify the navigation section.
Output:
<body>
</body>
Output:
Program: Display Navigation Bar Links/Menu, also covers responsive Behaviour of Navigation Bar
with a Toggler icon
Output:
navbar-expand-lg: Makes the navbar responsive. It collapses into a toggler menu on screens smaller
than "large".
tabindex="-1": Removes the disabled link from the keyboard navigation flow.
Note: We could have accomplished the same result without <ul> </ul> and <li></li>
Output:
Output:
Output:
Output:
Output:
<pre>
<img src="wallpaper1.jpg"/>
<hr/>
<img src="wallpaper2.jpg"/>
<hr/>
<img src="wallpaper3.jpg"/>
<hr/>
</pre>
Output:
Note: Observe that that Navigation bar is fixed at the top. It remains visible even when you scroll down
the page.
Note: Also observe that the content below the navbar is shifted up and may overlap with the navbar
unless you add padding or margin to compensate.
Note: To see the difference between sticky-top and fixed-top, you can add some content above the
navbar or ensure that the parent container <body> has enough scrollable content
<body>
<pre>
<h3>Start of Image</h3>
<img src="electricity1.jpg" />
<h3>End of Image</h3>
<hr/>
</pre>
<pre>
<img src="wallpaper1.jpg"/>
<hr/>
<img src="wallpaper2.jpg"/>
<hr/>
<img src="wallpaper3.jpg"/>
<hr/>
</pre>
</body>
Output:
When the Navigation Menu, reaches the top, then it will remain fixed for the remaining scrolling
Note:
The .input-group class is a container to enhance an input by adding an icon, text or a button in front or behind it as a "help text".
The .input-group-addon class attaches an icon or help text next to the input field.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h3>Input Groups</h3>
<p>The .input-group class is a container to enhance an input by adding an icon, text or a button in
front or behind it as a "help text".</p>
<p>The .input-group-addon class attaches an icon or help text next to the input field.</p>
<form>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="email" type="text" class="form-control" name="email" placeholder="Email">
</div>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password" type="password" class="form-control" name="password"
placeholder="Password">
</div>
<br>
<div class="input-group">
<span class="input-group-addon">Text</span>
<input id="msg" type="text" class="form-control" name="msg" placeholder="Additional Info">
</div>
</form>
<br>
</body>
</html>
Output:
Note: Bootstrap provides an easy way to align media objects (like images) to the left or to the right of
some content. This can be used to display blog comments, tweets and so on
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="container">
<h2>Media Object</h2>
<p>Use the "media-left" class to left-align a media object. Text that should appear next to the image,
is placed inside a container with class="media-body".</p>
<p>Tip: Use the "media-right" class to right-align the media object.</p><br>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Nested Media Objects</h2>
<p>Media objects can also be nested (a media object inside a media object):</p><br>
<div class="media">
<div class="media-left">
<img src="avatar1.png" class="media-object" style="width:45px">
</div>
<div class="media-body">
<h4 class="media-heading">John Doe <small><i>Posted on February 19,
2016</i></small></h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Output:
Note: The Carousel plugin is a component for cycling through elements, like a carousel (slideshow).
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="item">
<img src="chicago1.jpg" alt="Chicago" style="width:100%;">
</div>
<div class="item">
<img src="new-york.jpg" alt="New york" style="width:100%;">
</div>
</div>
</body>
</html>
Output:
Note: Add <div class="carousel-caption"> within each <div class="item"> to create a caption for each slide:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Carousel Example</h2>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
BVRAJU DATAPRO COMPUTERS 190
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="la1.jpg" alt="Los Angeles" style="width:100%;">
<div class="carousel-caption">
<h3>Los Angeles</h3>
<p>LA is always so much fun!</p>
</div>
</div>
<div class="item">
<img src="chicago1.jpg" alt="Chicago" style="width:100%;">
<div class="carousel-caption">
<h3>Chicago</h3>
<p>Thank you, Chicago!</p>
</div>
</div>
<div class="item">
<img src="new-york.jpg" alt="New york" style="width:100%;">
<div class="carousel-caption">
<h3>New York</h3>
<p>We love the Big Apple!</p>
</div>
</div>
</div>
</body>
</html>
Output:
Templates are nothing but readymade web pages with readymade Layout. We just need to replace
the existing content with our content.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
/* Set height of the grid so .sidenav can be 100% (adjust if needed) */
.row.content {height: 1500px}
<div class="container-fluid">
<div class="row content">
<div class="col-sm-3 sidenav">
<h4>John's Blog</h4>
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#section1">Home</a></li>
<li><a href="#section2">Friends</a></li>
<li><a href="#section3">Family</a></li>
<li><a href="#section3">Photos</a></li>
</ul><br>
<div class="input-group">
<input type="text" class="form-control" placeholder="Search Blog..">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</div>
<div class="col-sm-9">
<h4><small>RECENT POSTS</small></h4>
<hr>
<h2>I Love Food</h2>
<h5><span class="glyphicon glyphicon-time"></span> Post by Jane Dane, Sep 27,
2015.</h5>
<h5><span class="label label-danger">Food</span> <span class="label label-
primary">Ipsum</span></h5><br>
<p>Food is my passion. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur
<h4><small>RECENT POSTS</small></h4>
<hr>
<h2>Officially Blogging</h2>
<h5><span class="glyphicon glyphicon-time"></span> Post by John Doe, Sep 24,
2015.</h5>
<h5><span class="label label-success">Lorem</span></h5><br>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<hr>
<h4>Leave a Comment:</h4>
<form role="form">
<div class="form-group">
<textarea class="form-control" rows="3" required></textarea>
</div>
<button type="submit" class="btn btn-success">Submit</button>
</form>
<br><br>
<div class="row">
<div class="col-sm-2 text-center">
<img src="avatar1.png" class="img-circle" height="65" width="65" alt="Avatar">
</div>
<div class="col-sm-10">
<h4>Anja <small>Sep 29, 2015, 9:12 PM</small></h4>
<p>Keep up the GREAT work! I am cheering for you!! Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<br>
</div>
<div class="col-sm-2 text-center">
<img src="avatar2.png" class="img-circle" height="65" width="65" alt="Avatar">
</div>
<div class="col-sm-10">
<h4>John Row <small>Sep 25, 2015, 8:25 PM</small></h4>
<footer class="container-fluid">
<p>Footer Text</p>
</footer>
</body>
</html>
Output:
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
/* Remove the navbar's default rounded borders and increase the bottom margin */
.navbar {
margin-bottom: 50px;
border-radius: 0;
}
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">BLACK FRIDAY DEAL</div>
<div class="panel-body"><img src="https://placehold.it/150x80?text=IMAGE" class="img-
responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer">Buy 50 mobiles and get a gift card</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-danger">
<div class="panel-heading">BLACK FRIDAY DEAL</div>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">BLACK FRIDAY DEAL</div>
<div class="panel-body"><img src="https://placehold.it/150x80?text=IMAGE" class="img-
responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer">Buy 50 mobiles and get a gift card</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">BLACK FRIDAY DEAL</div>
<div class="panel-body"><img src="https://placehold.it/150x80?text=IMAGE" class="img-
responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer">Buy 50 mobiles and get a gift card</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">BLACK FRIDAY DEAL</div>
<div class="panel-body"><img src="https://placehold.it/150x80?text=IMAGE" class="img-
responsive" style="width:100%" alt="Image"></div>
<div class="panel-footer">Buy 50 mobiles and get a gift card</div>
</div>
</div>
</div>
</div><br><br>
</body>
</html>
Output:
Scrolldown:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
BVRAJU DATAPRO COMPUTERS 205
/* Add a gray background color and some padding to the footer */
footer {
background-color: #f2f2f2;
padding: 25px;
}
.carousel-inner img {
width: 100%; /* Set width to 100% */
min-height: 200px;
}
/* Hide the carousel text when the screen is less than 600 pixels wide */
@media (max-width: 600px) {
.carousel-caption {
display: none;
}
}
</style>
</head>
<body>
<div class="container">
<div class="item">
<img src="https://placehold.it/800x400?text=Another Image Maybe" alt="Image">
<div class="carousel-caption">
<h3>More Sell $</h3>
<p>Lorem ipsum...</p>
</div>
</div>
</div>
</body>
</html>
Output:
Cards-HeaderFooter
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
<div class="card">
<div class="card-header">
Featured
</div>
<div class="card-body">
<h5 class="card-title">Special title treatment</h5>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</body>
</html>
Cards-HeaderFooter-Style2
<html>
<body>
</body>
</html>
Cards-Styles
<html>
<head>
BVRAJU DATAPRO COMPUTERS 212
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
</body>
</html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
</body>
</html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
<div class="card-group">
<div class="card">
<img src="https://staticg.sportskeeda.com/wp-content/uploads/2016/03/pele-1970-
1457113575-800.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to
additional content. This content is a little bit longer.</p>
</div>
<div class="card-footer">
BVRAJU DATAPRO COMPUTERS 218
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
<div class="card">
<img src="https://www.realmadrid.com/img/horizontal_940px/maradona_gettyimages-
537157025_20201229025034.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This card has supporting text below as a natural lead-in to additional
content.</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
<div class="card">
<img src="https://e3.365dm.com/21/04/2048x1152/football-messi-lionel_5359730.jpg"
class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to
additional content. This card has even longer content than the first to show that equal height
action.</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
</body>
</html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</head>
<body>
</body>
</html>
Carousel-ex2-with interval
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
<body>
<!-- Note: remove the cursor pointer on slide, only then time interval would work -->
</body>
</html>