WP UNIT 3-Updated
WP UNIT 3-Updated
FUNDAMENTALS
Contents: BOOTSTARP FUNDAMENTALS: Why Bootstrap, CSS over Bootstrap, How to Use Bootstrap. Bootstrap
Grid System, Bootstrap Responsive, Bootstrap Classes, Bootstrap Components (i.e., Button, Table, List, etc.),
Bootstrap as a Cross Platform. W3C FUNDAMENTALS: What is W3C, How W3C handles /Supports Web
Technologies
10/18/2024 1
BOOTSTRAP
10/18/2024 2
BOOTSTRAP
❑It generally works on a grid system for creating page layout with
the help of rows and columns and it supports all browsers for
creating responsive websites.
10/18/2024 3
BOOTSTRAP
• Here are some key features of Bootstrap:
1.Grid System: Bootstrap uses a flexible grid system that allows for responsive layouts.
You can create various column arrangements that adapt to different screen sizes.
2.Pre-designed Components: It includes a wide range of reusable components like
buttons, modals, navbars, alerts, and more, which can be easily customized.
3.Responsive Design: Bootstrap ensures that your website looks good on all devices,
from mobile phones to large desktop monitors.
4.JavaScript Plugins: The framework comes with built-in JavaScript components for
functionality like carousels, tooltips, and dropdowns, enhancing user interaction.
5.Customizable: You can easily customize Bootstrap's styles using variables, allowing
you to tailor the look and feel to match your branding.
6.Documentation: Bootstrap has comprehensive documentation and a large
community, making it easy to find support and resources.
10/18/2024 4
Difference between Bootstrap 5, Bootstrap 4 and Bootstrap 3.
5
Difference between Bootstrap 5, Bootstrap 4 and Bootstrap 3.
6
Why Use Bootstrap?
Advantages of Bootstrap:
● Easy to use: Anybody with just basic knowledge of HTML and CSS can
start using Bootstrap
● Responsive features: Bootstrap's responsive CSS adjusts to phones,
tablets, and desktops
● Mobile-first approach: In Bootstrap 3, mobile-first styles are part of the
core framework
● Browser compatibility: Bootstrap is compatible with all modern
browsers (Chrome, Firefox, Internet Explorer, Edge, Safari, and Opera)
7
Getting Started with Bootstrap
Where to Get Bootstrap?
There are two ways to start using Bootstrap on your own web site.
You can:
❑Download Bootstrap from getbootstrap.com
❑Include Bootstrap from a CDN
10/15/2024 8
Getting Started with Bootstrap
Bootstrap CDN
• MaxCDN provides CDN support for Bootstrap's CSS and
JavaScript. You must also include jQuery:
10/15/2024 9
Bootstrap CDN …
One advantage of using the Bootstrap CDN:
Many users already have downloaded Bootstrap from MaxCDN when
visiting another site. As a result, it will be loaded from cache when they
visit your site, which leads to faster loading time. Also, most CDN's will
make sure that once a user requests a file from it, it will be served from
the server closest to them, which also leads to faster loading time.
jQuery
Bootstrap uses jQuery for JavaScript plugins (like modals, tooltips, etc).
However, if you just use the CSS part of Bootstrap, you don't need
jQuery.
10
Getting Started with Bootstrap
Create First Web Page With Bootstrap
1. Add the HTML5 doctype
• Bootstrap uses HTML elements and CSS properties that require the HTML5
doctype.
• Always include the HTML5 doctype at the beginning of the page, along with
the lang attribute and the correct character set:
10/15/2024 11
Getting Started with Bootstrap
Create First Web Page With Bootstrap
2. Bootstrap 3 is mobile-first :
❑Bootstrap 3 is designed to be responsive to mobile devices.
❑To ensure proper rendering and touch zooming, add the following <meta> tag
inside the <head> element:
10/18/2024 12
Getting Started with Bootstrap
Create First Web Page With Bootstrap
3. Containers
Bootstrap also requires a containing element to wrap site contents.
There are two container classes to choose from:
❑The .container class provides a responsive fixed width container
❑The .container-fluid class provides a full width container, spanning
the entire width of the viewport
10/18/2024 13
Bootstrap Grid System
• Bootstrap's grid system allows up to 12 columns across the page.
• If you do not want to use all 12 columns individually, you can
group the columns together to create wider columns:
Grid Classes
The Bootstrap grid system has four classes:
•xs (for phones - screens less than 768px wide)
•sm (for tablets - screens equal to or greater than 768px wide)
•md (for small laptops - screens equal to or greater than 992px wide)
•lg (for laptops and desktops - screens equal to or greater than 1200px wide)
The classes above can be combined to create more dynamic and flexible layouts.
10/18/2024 15
Bootstrap Grid System
Basic Structure of a Bootstrap Grid
The following is a basic structure of a Bootstrap grid:
<div class="container">
<div class="row">
<div class="col-*-*"></div>
<div class="col-*-*"></div>
If You want to create the layout you want, create a container
</div>
<div class="row"> (<div class="container">). Next, create a row (<div
<div class="col-*-*"></div>
<div class="col-*-*"></div> class="row">). Then, add the desired number of columns
<div class="col-*-*"></div>
</div> (tags with appropriate .col-*-* classes). Note that numbers
<div class="row">
... in .col-*-* should always add up to 12 for each row.
</div>
</div>
10/18/2024 16
Bootstrap Grid System
10/18/2024 17
Bootstrap Grid System
10/18/2024 18
Bootstrap Grid System- works across multiple devices:
10/18/2024 19
Bootstrap Grid - Stacked-to-horizontal
<div class="container"> The following example
<h1>Hello World!</h1>
<div class="row"> shows a simple "stacked-
<div class="col-sm-6" to-horizontal" two-
style="background-
color:yellow;"> column layout, meaning
<p>Lorem ipsum...</p> it will result in a
</div>
<div class="col-sm-6"
50%/50% split on all
style="background- screens, except for extra
color:pink;"> small screens, which it
<p>Sed ut
perspiciatis...</p> will automatically stack
</div> (100%):
</div>
</div>
20
Bootstrap Grid Example: Small Devices
Devices
<div class="container- <div class="row"> <div class="container-
fluid"> <div class="col-md-6" fluid">
<h1>Hello World!</h1> style="background- <h1>Hello World!</h1>
<div class="row"> color:yellow;"> <div class="row">
<div class="col-sm-4" <div class="col-lg-6"
style="background-
<p>Lorem style="background-
color:yellow;"> ipsum...</p> color:yellow;">
<p>Lorem </div> <p>Lorem
ipsum...</p> <div class="col-md-6" ipsum...</p>
</div> style="background- </div>
<div class="col-sm-8" color:pink;"> <div class="col-lg-6"
style="background- <p>Sed ut style="background-
color:pink;"> perspiciatis...</p> color:pink;">
<p>Sed ut </div> <p>Sed ut
perspiciatis...</p> perspiciatis...</p>
</div>
</div> </div> 22
Bootstrap Text/Typography
1.Bootstrap's Default Settings
Bootstrap's global default font-size is 14px, with a line-height of
1.428.
This is applied to the <body> and all paragraphs.
In addition, all <p> elements have a bottom margin that equals
half their computed line-height (10px by default).
2.Typography
The elements below are HTML elements that will be styled a little bit differently by
Bootstrap than browser defaults. Look at the "Try it" examples to see the
result/differences.
23
Bootstrap Text/Typography
Bootstrap's Default Settings
• Bootstrap's global default font-size is 14px, with a line-height of 1.428.
• This is applied to the <body> element and all paragraphs (<p>).
<h1> - <h6>
By default, Bootstrap will style the HTML headings (<h1> to <h6>) in the following way:
Example
h1 Bootstrap heading (36px)
h2 Bootstrap heading (30px)
h3 Bootstrap heading (24px)
h4 Bootstrap heading (18px)
h5 Bootstrap heading (14px)
h6 Bootstrap heading (12px)
10/18/2024 24
Bootstrap Text/Typography
10/18/2024 25
Bootstrap Text/Typography
10/18/2024 26
Bootstrap Text/Typography
The classes for background colors are:.bg-primary, .bg-success,
.bg-info, .bg-warning, and .bg-danger:
10/18/2024 27
Bootstrap Text/Typography
28
Bootstrap Tables
Bootstrap Basic Table
A basic Bootstrap table has a light padding and only horizontal dividers.
10/18/2024 29
Bootstrap Tables
Bootstrap Basic Table
A basic Bootstrap table has a light padding and only horizontal dividers.
10/18/2024 30
Bootstrap Tables
10/18/2024 31
Bootstrap Tables
10/18/2024 32
Bootstrap Responsive Tables
The .table-responsive class creates a responsive table.
The table will then scroll horizontally on small devices (under 768px).
When viewing on anything larger than 768px wide, there is no difference:
10/18/2024 33
Bootstrap Images
Rounded Corners
The .img-rounded class adds rounded corners to an
image
10/18/2024 34
Bootstrap Image Gallery
Image Gallery
You can also use Bootstrap's grid system in conjunction with the .thumbnail class
to create an image gallery.
10/18/2024 35
Bootstrap Responsive Images
Images come in all sizes. So do screens.
Responsive images automatically adjust to fit the size of the screen.
Create responsive images by adding an .img-responsive class to the <img> tag.
The image will then scale nicely to the parent element.
The .img-responsive class applies display: block; and max-width: 100%; and height:
auto; to the image:
10/18/2024 36
Bootstrap Buttons
10/18/2024 37
Bootstrap Button Groups
10/18/2024 38
Bootstrap Button Groups
<div class="btn-group-vertical">
10/18/2024 39
Bootstrap Forms
● Wrap labels and form controls in <div class="form-group"> (needed for optimum spacing)
● Add class .form-control to all textual <input>, <textarea>, and <select> elements
10/18/2024 40
Bootstrap Forms-Bootstrap Vertical Form (default)
<form action="/action_page.php">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<div class="checkbox">
<label><input type="checkbox"> Remember me</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
10/18/2024 41
Bootstrap Forms
10/18/2024 42
Bootstrap Component List:
43
Bootstrap as a Cross Platform
Benefits of Bootstrap as a Cross-Platform Framework:
•Consistency: Ensures that users experience the same interface and functionality across
devices.
•Adaptability: Works with various platforms, operating systems, and browsers without
10/18/2024 44
W3C FUNDAMENTALS
W3C FUNDAMENTALS: What is W3C
❑ The W3C (World Wide Web Consortium) is the main international standards
❑ It was founded in 1994 by Tim Berners-Lee, the inventor of the web, and is
responsible for developing protocols and guidelines that ensure the long-
development.
10/18/2024 46
W3C FUNDAMENTALS
Characteristics of W3C
▪ It is responsible for creating and publishing web standards.
▪ It also ensures the growth and development of web.
▪ It also develops the standards for web scripting, web applications
and other dynamic contents.
▪ It is an organization which helps in the promotion of
interoperability by the promotion and designing of open protocols.
▪ W3C uses the principles of modularity, simplicity and extensibility
while designing web protocols.
10/18/2024 47
W3C FUNDAMENTALS
Key Aspects of the W3C
• The W3C promotes interoperability, ensuring that different web technologies work together
smoothly. This means that a website or web service works correctly across different platforms,
devices, and browsers.
• Web standards minimize conflicts between proprietary software and ensure that websites remain
functional and accessible across the internet.
10/18/2024 48
W3C FUNDAMENTALS
Key Aspects of the W3C
3. W3C Recommendations
▪ HTML (HyperText Markup Language): The standard language for creating web pages.
▪ CSS (Cascading Style Sheets): A style sheet language used for describing the presentation of a document.
▪ SVG (Scalable Vector Graphics): A standard for vector graphics on the web.
▪ WAI (Web Accessibility Initiative) Guidelines: Standards that ensure websites are accessible to people
with disabilities.
10/18/2024 49
W3C FUNDAMENTALS
Key Aspects of the W3C
4. Open Participation
• The W3C is an open organization, meaning that web developers, companies, and even individuals can
contribute to the creation and refinement of web standards. It operates by consensus among its
• Some of its members include large tech companies like Google, Microsoft, Apple, and Mozilla.
10/18/2024 50
How W3C supports Web Technologies
The W3C (World Wide Web Consortium) handles and supports web technologies by
businesses, and other organizations to ensure that web technologies are interoperable,
10/18/2024 51
How W3C supports Web Technologies
10/18/2024 52
How W3C supports Web Technologies
5. Supporting Innovation
For example, W3C is actively working on:
• WebAssembly (Wasm): Enabling high-performance applications on the web.
• WebXR: Supporting virtual and augmented reality experiences.
• WebRTC: Facilitating real-time voice, video, and data communication.
10/18/2024 53
How W3C supports Web Technologies
❑ Performance and Compatibility Testing: W3C offers resources for testing web technologies to ensure
they work efficiently across different browsers and devices.
10/18/2024 54
How W3C supports Web Technologies
10/18/2024 55
How W3C supports Web Technologies
W3C provides resources, documentation, and educational materials to help developers learn and implement
❑ Training and Certification: W3C offers training programs, courses, and certification in web technologies.
❑ Developer Resources: Guides, tutorials, and best practices to ensure that web developers understand and
10/18/2024 56
Q&A
Thank You !
10/18/2024 57