Unit 1
Unit 1
Unit-I
By
Prof. Priyanka S. Jadhav
(Assit. Prof., Comp. Dept. , SKNCOE, Pune)
Contents
Internet
Basic Internet Protocols
World Wide Web (www)
Web Clients
Web Servers
HTTP Request Message
HTTP Response Message
HTML
HTML Elements
CSS
Bootstrap
Internet
• The Internet is a vast network that connects
computers all over the world.
• Internet is a global network that connects billions
of computers across the world with each other and
to the World Wide Web.
• It uses standard internet protocol suite (TCP/IP) to
connect billions of computer users worldwide.
Version Year
HTML 1991
XHTML 2000
HTML5 2014
HTML Page Structure
HTML Tags & Elements
HTML tags are element names surrounded by
angle brackets:
<tagname> content goes here… </tagname>
HTML tags normally come in pairs like <p> and
</p>
The first tag in a pair is the start tag, the second
tag is the end tag
The end tag is written like the start tag, but with
a forward slash inserted before the tag name
HTML Elements
• Headings
• Paragraphs
• Line break
• Text Formatting
• Colors and Fonts
• Hyperlink-Anchor Tag
• Images
• Audios
• Videos
• Lists
• Tables
• Frames and Forms
• Span and Div tag
HTML- Headings
HTML headings are defined with the <h1> to
<h6> tags.
<h1> defines the most important heading.
<h6> defines the least important heading.
HTML- Paragraph, Line Break
and Horizontal Rule
<p> </p> is used for paragraph tags.
<p>This is my first
paragraph</p>
size attribute :
We can set content font size using size attribute.
The range of accepted values is from 1(smallest) to 7(largest).
The default size of a font is 3
Example:
<font size = "5"> Hello
</font>
HTML- Fonts & Colors
color attribute :
We can set font color using color attribute
can specify the color either by color name or hexadecimal
code for that color.
Example :
<font color = "#FF00FF"> Hello
</font>
.
<font color = "red"> Hello </font>
HTML- HyperLinks
Anchor Tag:
<a> tag defines a hyperlink,
which is used to link one page to another
HTML- HyperLinks
href attribute :
The href attribute of <a> element indicates the link's
destination
<a href = "http://www.google.com">
Google </a>
target attribute :
specifies where to open the linked document
Example:
target = _blank - Opens the linked document in a new window or
tab<a href = "http://www.google.com" target =_blank>
Google </a>
HTML- HyperLinks
Types of Links:
Example:
Example:
<ol>
<li>Apple</li>
1. Apple
<li>Orange</li> 2. Orange
3. Grapefruit
<li>Grapefruit</li
>
</ol>
HTML – Ordered Lists
Ordered Lists
Example:
Example:
Example:
<ul>
<li>Apple</li>
• Apple
<li>Orange</li> • Orang
• Grapefruit
<li>Grapefruit</li
>
</ul>
HTML – Unordered Lists
Unordered Lists
Example:
<ul
type="Square">
<li>Apple</li>
Apple
Orang
<li>Orange</li>
Grapefruit
<li>Grapefruit</li
>
</ul>
HTML – Unordered Lists
Unordered Lists
Example:
<ul type=“Circle
">
<li>Apple</li>
o Apple
o Orang
<li>Orange</li>
o Grapefruit
<li>Grapefruit</li
>
</ul>
HTML – Description Lists
Description Lists
<dd> tag definition
<dt> tag text
Example:
<dl>
<dd>HTML</
dd>
<dt>A markup
language
…</dt>
<dd>CSS</
dd>
<dt>Language
used to
…</dt>
</dl>
HTML – Multimedia
Types of Multimedia:
Example :
MP3 audio/mpeg
OGG audio/ogg
WAV audio/wav
HTML – Audio
Example:
<audio controls>
<source src=“music1.mp3" type="audio/
mpeg">
Your browser does not support the audio
element.
</audio>
The controls attribute adds audio controls, like play, pause,
and volume.
The <source> element allows you to specify alternative audio
files which the browser may choose from. The browser will
use the first recognized format.
The text between the <audio> and </audio> tags will only be
displayed in browsers that do not support
the <audio> element.
HTML – Audio
The controls attribute adds audio controls, like play,
pause, and volume.
The <source> element allows you to specify
alternative audio files which the browser may choose
from. The browser will use the first recognized format.
The text between the <audio> and </audio> tags will
only be displayed in browsers that do not support
the <audio> element.
MP3 audio/mpeg
OGG audio/ogg
WAV audio/wav
HTML – Video
The HTML <video> element is used to show a video
on a web page.
MP4 video/mp4
WebM video/webm
Ogg video/ogg
HTML – Video
Example :
<video width="320" height="240" controls>
Student Database
HTML – HTML Table
HTML Table Example :
<html> <tr>
<body> <td>2</td>
<table border=1 width=50% <td>Amit</td>
cellspacing=0> <td>Pune</td>
</tr>
<tr>
<th>RollNo</th> <tr>
<th>Name</th> <td>3</td>
<th>Address</th> <td>Neha</td>
</tr> <td>Mumbai</td>
</tr>
<tr>
<td>1</td> </table>
<td>Bhavana</td> </body>
<td>Nashik</td> </html>
</tr>
HTML – HTML Table
HTML Table Example 2:
Time Table:
HTML – HTML Table
HTML Table Example 2 :
<html> <tr>
<body> <td>12:00-12:30 </td>
<table border=1 width=50% <td colspan=4 align=center
align=center> bgcolor=yellow>Lunch Break</td>
<tr> </tr>
<th>Time/Day </th>
<th> Mon </th> <tr>
<th> Tue </th> <td>12:30-1:30 </td>
<th> Wed </th> <td>Maths </td>
<th> Thus </th> <td rowspan=2>DBMSL(PR) Batch T1
</tr> </td>
<tr> <td>Maths </td>
<td>10:00-11:00 </td> <td rowspan=2>DBMSL(PR) Batch
<td>DBMS </td> T2</td>
<td>Maths </td> </tr>
<td>DBMS </td>
<td>DBMS</td> <tr>
</tr> <td>1:30-2:30 </td>
<tr> <td>ADS </td>
<td>11:00-12:00 </td> <td>ADS </td>
<td>WT </td> </tr>
<td>DBMS </td> </table>
<td>WT </td> </body>
<td>Maths</td> </html>
</tr>
HTML – Forms
• HTML forms are used to take user inputs.
<tr>
<td>Name</td>
<td><input type=“text”></td>
</tr>
<tr>
<td>Address</td>
<td><input type=“text”></td>
</tr>
<tr>
<td>Mobile </td>
<td><input type=“number”></td>
</tr>
Forms – Example 2
<tr>
<td>DOB </td>
<td><input type=“date”></td>
</tr>
<tr>
<td>Gender </td>
<td><input type=“radio”>Male
<input type=radio>FeMale</td>
</tr>
<tr>
<td>Hobbies </td>
<td><input
type=“checkbox”>Cricket
<input
type=checkbox>Hockey</td>
</tr>
Forms – Example 2
<tr>
<td>Select Branch </td>
<td><select size=“2”>
<option> Computer</option>
<option> IT</option>
<option> Civil</option>
</select>
</td>
</tr>
<tr>
<td>Rate this site </td>
<td>
<input type=“number” min=1
max=5>
</td>
</tr>
Forms – Example 2
<tr>
<td>Comment </td>
<td><textarea col=“10”
rows=“3”>
</textarea></td>
</tr>
<tr>
<td colspan=“2” align=“center”>
<button >Click</button>
<button >Reset</button>
</td>
</tr>
</body>
</html>
HTML – Frames
• HTML frames are used to divide your browser
window into multiple sections where each section
can load a separate HTML document.
<noframes>
<body> Your browser does not support frames.
</body>
</noframes>
</frameset>
HTML – Frames
• HTML Frame Example 2:
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
HTML – iFrames
• HTML5 supports <iframe> tag instead of <frame>
tag
<!DOCTYPE html>
<html>
<body>
</body>
</html>
HTML – Span and Div
HTML <span> tag is an inline container used to mark up a
part of a text, or a part of a document.
HTML <div> tag is an block-level 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.
<html>
<html>
<body>
<body>
My mother has <div
My mother has <span
style="color:blue"> blue
style="color:blue"> blue
</div> eyes and my father
</span> eyes and my
has <div style=
father has <span
"color:green"> dark
style="color:green">dark
green</div> eyes.
green</span> eyes.
</body>
</body>
</html>
</html>
HTML V/S HTML 5
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 simple <meta charset="UTF-8">
Transitional//EN">
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 Vector graphics is integral part of HTML5 e.g. SVG and
technologies such as VML, Silverlight, Flash etc canvas
It is almost impossible to get true GeoLocation of user JS GeoLocation API in HTML5 helps identify location of
browsing any website especially if it comes to mobile user browsing any website (provided user allows it)
devices.
Not possible to draw shapes like circle, rectangle, Using Html5 you can draw shapes like circle, rectangle,
triangle. triangle.
Does not allow JavaScript to run in browser. JS runs in Allows JavaScript to run in background. This is possible
same thread as browser interface. due to JS Web worker API in HTML5
Example:
<body>
<p style=“color : red“ > This is paragraph </p>
</body>
CSS – Internal CSS
Style Tag :
<head>
Example: <style>
p { color: red;}
</style>
</head>
CSS – External CSS
Link Tag :
Example: <head>
<link rel="stylesheet" href="styles.css">
</head>
CSS – External CSS
Example:
Index.html
<html>
<head> style2.css
<link rel="stylesheet"
type="text/css"
<p { color: red;}
href=“style2.css">
</head>
<body>
<p> Hello Good Morning </p>
</body>
</html>
CSS – Some Properties
CSS Color
CSS background
CSS Border
CSS Text
CSS Font
CSS Margin
CSS Padding
CSS Table
CSS Properties – Color
Text Color
color: value
Example:
{color : blue;}
Background-color
Example:
h1 { background-color: green; }
Background-image
Example:
body { background-image: url ("paper.gif");}
CSS Properties – Text
text-alignment (left, right, center, justify)
Example:
div {text-align: center;}
<head>
<link rel="stylesheet“
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></
script>
</head>
<body>
<div class="row">
<div class="col-sm-4" style="background-color : pink"> Col1 Data </div>
<div class="col-sm-4" style="background-color : yellow"> Col2 Data </div>
<div class="col-sm-4" style="background-color : lavender"> Col3 Data </div>
</div>
</body>
</html>
Bootstrap – Grid
xs
(for phones -
screens less than sm
768px wide) (for tablets -
md
screens equal to
or greater than (for small
768px wide) laptops - screens lg
equal to or
greater than (for laptops and
992px wide) desktops -
screens equal to
or greater than
1200px wide)
Bootstrap – Grid Structure
<div class="row“>
<div class="col-*-*"></div>
</div>
<div class="row“>
<div class="col-*-*"></div>
<div class="col-*-*"></div>
<div class="col-*-*"></div>
</div>
<div class="row">
...
</div>
Bootstrap – Grid Example
Example of Bootstrap Grid:
<div class="row">
<div class="col-sm-
4"></div>
<div class="col-sm-
4"></div>
<div class="col-sm-
4"></div>
</div>
Bootstrap – Some Classes
Some Bootstrap classes Examples:
❏ https://www.w3schools.com/bootstrap/