Unit I- HTML, CSS, Bootstrap
Unit I- HTML, CSS, Bootstrap
Topic:
Internet Protocol & HTTP
By Prof. Bhavana A. Khivsara ( Assistant Professor, SNJB’s Late Sau K. B. Jain COE, Chandwad)
Blog: https://bhavanakhivsara.wordpress.com/
Youtube Channel: https://www.youtube.com/@bhavanakhivsara/playlists
Internet
● The Internet is a vast network that connects computers all over the
world.
● Through the Internet, people can share information and
communicate from anywhere with an Internet connection.
Protocol
HTTP
request line
(GET, POST, GET /somedir/page.html HTTP/1.1
HEAD commands) Host: www.someschool.edu
User-agent: Mozilla/4.0
header Connection: close
lines Accept-language:fr
Carriage return,
line feed (extra carriage return, line feed)
indicates end
of message
HTTP Response Message
HTTP response message example
status line
(protocol
status code HTTP/1.1 200 OK
status phrase) Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
header Server: Apache/1.3.0 (Unix)
lines Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
Content-Type: text/html
data, e.g.,
requested data data data data data ...
HTML file
Web Client and Web Server
https://hackernoon.com/http-made-easy-understanding-th
e-web-client-server-communication-yz783vg3
What is Web Server?
Web Browsers are software installed on your PC. To access the Web you need a web browsers.
Topic:
HTML
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
Different Web Technologies
● HTML ● SQL
● XHTML ● ASP
● CSS ● ADO
● XML ● PHP
● JavaScript ● .NET
● VBSCRIPT ● SMIL
● DOM ● SVG
● DHTML ● FLASH
● AJAX ● Java applets
● E4X ● Java servlets
● WMLScript ● Java Server Page
List of Technologies
Frameworks Frameworks
● EmberJS ● ExpressJS
● AngularJS ● Django
● ReactJs
● BackboneJS ● laravel
● VueJS ● NodeJS
How to choose a technology?
Depends on:
● What is the type of content?
● Who is your audience?
● Who will modify your content?
● What are your Future Plans?
● Availability of technology?
● Your previous experience?
● Portability and Data sharing
Web - Domain Names & Extension Types
•A domain name is the part of your Internet address that comes after "www". For example, in
Tutorialspoint.com the domain name is tutorialspoint.com.
•Some Domain Extensions are as mentioned below
•.com − Stands for company/commercial, but it can be used for any website.
•.net − Stands for network and is usually used for a network of sites.
•.org − Stands for organization and is supposed to be for non-profit bodies.
•.us, .in − They are based on your country names so that you can go for country specific domain extensions
•.biz − A newer extension on the Internet and can be used to indicate that this site is purely related to business.
HTML
HTML
Version Year
HTML 1991
XHTML 2000
HTML5 2014
HTML Tags
● Headings,
● paragraphs,
● line break,
● Text Formatting (Value Addition)
● colors and fonts,
● links,
● Hyperlink-anchor tag ( Value Addition)
● images
● lists,
● tables,
● frames and forms,
● Span and Div tag ( Value Addition)
HTML- Heading Tags
HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines
the least important heading:
Output
HTML- Paragraph Tag, Line Break and Horizontal Line
The <a> tag defines a hyperlink, which is used to link from one page to another
Example- target = _blank - Opens the linked document in a new window or tab
HyperLinks
Link to a document called a1.html in the same directory <a href="a1.html"> Click </a>
Link to a document called parent.html in the parent directory <a href="../parent.html"> Click </a>
Link to a document called a1.html in the subdirectory WTL <a href="WTL/a1.html"> Click </a>
Example:-
<a href="#section1">Introduction</a><br>
<a href="#section2">background</a><br>
<h2 id="section1">Introduction</h2>
... Section 1 follows here …
<h2 id="section2">background</h2>
... Section 2 follows here ...
Link tag
<head>
<link rel="stylesheet" href="styles.css">
</head>
The <link> tag defines the relationship between the current document and an external resource.
rel- Required attribute. It specifies the relationship between the current document and the linked document
Images- img tag
<img src= “index.jpeg” alt= “Home page” height= "500" width="600" border= “2” >
List tag
List
Types
Ordered Unordered Definition
<dl>
<dt>HTML</dt>
<dd>A markup language …</dd>
<dt>CSS</dt>
<dd>Language used to …</dd>
</dl>
HTML Table
Tag Description
<table> Defines a table
HTML Table <th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell in a table
<caption> Defines a table caption
<colgroup> Specifies a group of one or more columns in a table for
formatting
<col> Specifies column properties for each column within a
<colgroup> element
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table
HTML Table
<html> <tr>
<body> <td>2</td>
<table border=1 width=50% cellspacing=0> <td>Amit</td>
<td>Pune</td>
<tr> </tr>
<th>RollNo</th>
<th>Name</th> <tr>
<th>Address</th> <td>3</td>
</tr> <td>Neha</td>
<td>Mumbai</td>
<tr> </tr>
<td>1</td>
<td>Bhavana</td> </table>
<td>Nashik</td> </body>
</tr> </html>
HTML Table Example-2
<html>
<body>
<table border=1 width=50% cellspacing=0>
<tr bgcolor=red>
<th>RollNo</th>
<th>Name</th>
<th>Address</th>
</tr>
HTML Table Example-3
<html>
<head>
<style>
tr:nth-child(even)
{
background-color:skyblue;
}
</style>
</head>
<body>
HTML Table Example-4
<html>
<body>
<table border=1 width=50% cellspacing=0>
<colgroup>
<col style="background-color:skyblue">
</colgroup>
<tr>
<th>RollNo</th>
<th>Name</th>
<th>Address</th>
</tr>
<tr>
HTML Table Example- 5
<html> <tr>
<body> <td>Feb</td>
<table border=1 bordercolor=black> <td>$80</td>
<thead style=color:green> </tr>
<tr> </tbody>
<th>Month</th>
<tfoot style=color:red>
<th>savings</th> <tr>
</tr> <td>Total</td>
</thead> <td>$180</td>
</tr>
<tbody style=color:blue> </tfoot>
<tr>
<td>Jan</td> </table>
<td>$100</td> </body>
</tr> </html>
HTML Table Example-6
Topic:
Div and Span tag
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
Span and Div tag- Value Addition
•The <span> tag is an inline container used to mark up a part of a text, or a part of a document.
•The <span> tag is much like the <div> element, but <div> is a block-level element and
<span> is an inline element.
Span and Div tag- Value Addition
<html> <html>
<body> <body>
My mother has <span style="color:blue"> blue My mother has <div style="color:blue"> blue </div>
</span> eyes and my father has <span eyes and my father has <div style= "color:green">
style="color:green">dark green</span> eyes. dark green</div> eyes.
</body> </body>
</html> </html>
Web Technology
Topic:
HTML Frames
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
HTML Frames
•Example
● A simple three-framed page:
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
● Each <frame> in a <frameset> can have different attributes, such as border,
scrolling, the ability to resize, etc.
Web Technology
Topic:
HTML Forms
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
HTML Form Example-1-
Login Page
HTML Forms – Example 2 Registration Form
HTML Form Elements
Tag Description
<form> Defines an HTML form for user input
<input> Defines an input control
<textarea> Defines a multiline input control (text area)
<label> Defines a label for an <input> element
<select> Defines a drop-down list
<option> Defines an option in a drop-down list
<button> Defines a clickable button
HTML Input Types
Topic:
Difference Between HTML &
HTML5
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
Html Html5
DOCTYPE declaration in Html is too longer DOCTYPE declaration in Html5 is very simple "<!DOCTYPE html>
character encoding in Html is also longer character encoding (charset) declaration is also very simple <meta
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> charset="UTF-8">
Audio and Video are not part of HTML4 Audio and Videos are integral part of HTML5 e.g. <audio> and <video> tags.
Vector Graphics is possible with the help of technologies such as VML, Vector graphics is integral part of HTML5 e.g. SVG and canvas
Silverlight, Flash etc
It is almost impossible to get true GeoLocation of user browsing any JS GeoLocation API in HTML5 helps identify location of user browsing any
website especially if it comes to mobile devices. website (provided user allows it)
Not possible to draw shapes like circle, rectangle, triangle. Using Html5 you can draw shapes like circle, rectangle, triangle.
Does not allow JavaScript to run in browser. JS runs in same thread as Allows JavaScript to run in background. This is possible due to JS Web worker
browser interface. API in HTML5
Topic:
CSS- Cascading Style sheet
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
CSS
CSS
SPV
Selector
Types of CSS
Example:
<p style= “color:red” >
Types of CSS
Internal Example:
CSS <head>
<style>
p { color: red;}
</style>
</head>
Types of CSS
2 Files
1> .html 2> .css
a1.html a2.css
<html>
<head>
<link rel="stylesheet" type="text/css" href="a2.css"> p { color: red;}
</head>
<body>
<p> Hello Good Morning </p>
</body> </html>
When to use which Types of CSS
Types of CSS
❏ CSS Color
❏ CSS background
❏ CSS Border
❏ CSS Text
❏ CSS Font
❏ CSS Margin
❏ CSS Padding
❏ CSS Table
CSS Properties- Color
❏ color: value
❏ Example:
❏ color : blue;
CSS Properties-background
● background-color
○ Example:
■ h1 { background-color: green; }
● background-image
○ Example:
■ body { background-image: url("paper.gif");}
CSS Properties- border
❏ color
❏ background-color
❏ text-alignment (left, right, center, justify)
❏ text-decoration (overline, underline, linethrough)
❏ text-transform (uppercase, lowercase, capitalize)
CSS Properties- Font
❏ Font-family
❏ Font-Style( normal, italic)
❏ font-size( in px)
❏ font-weight(normal,bold)
CSS Properties- Margin
❏ margin-top
❏ margin-right
❏ margin-bottom
❏ margin-left
CSS Properties- Padding
❏ padding-top
❏ padding-right
❏ padding-bottom
❏ padding-left
CSS Box Model
CSS Properties- Table
Topic:
Bootstrap
By Bhavana A. Khivsara
Assistant Professor
SNJB’s Late Sau k. B. Jain College of Engineering, Chandwad
Bootstrap
Bootstrap History
Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter, and released as an
open source product in August 2011 on GitHub.
In June 2014 Bootstrap was the No.1 project on GitHub!
Bootstrap- Advantages
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, Safari, and Opera)
Bootstrap Grid
Bootstrap Grid
● If you do not want to use all 12 columns individually, you can group the columns
together to create wider columns
xs
(for phones - screens
sm
less than 768px
wide) (for tablets - screens
equal to or greater
md
than 768px wide)
(for small laptops -
lg
screens equal to or
greater than 992px (for laptops and
wide) desktops - screens
equal to or greater
than 1200px wide)
Bootstrap Grid
<div class="row">
<div class="col-*-*"></div>
<div class="col-*-*"></div>
</div>
.col-sm-4 .col-sm-4 .col-sm-4
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
</div>
Bootstrap- Where to get?
Websites:
❏ https://www.w3schools.com/html/
❏ https://www.w3schools.com/css/
❏ https://www.w3schools.com/bootstrap/