Web Programming: What? Why? How?
Web Programming: What? Why? How?
2
“ WEB
4
“ Website
5
“ Browsers
6
• Web graphic • Web Application
designer Programmer
• Interactive designer • Page Engineer
• Media specialist • DBMS ADMIN
• Webmaster
Web
Graphics
technology
Project Site
7
HTML 5
HTML vs HTML5
9
New Elements in HTML 5
▰ <acronym> ▰ <font>
▰ <applet> ▰ <frame>
▰ <basefont> ▰ <frameset>
▰ <big> ▰ <isindex>
▰ <center> ▰ <noframes>
▰ <dir> ▰ <s>
▰ <u> ▰ <strike>
▰ <tt>
11
UNIT-I Chapter 1- HTML 5
14
Types of
Elements
Refer reference book mentioned in syllabus :
HTML 5 Black Book: Covers CSS3, Javasvript, XML, XHTML, AJAX, PHP and jQuery
15
<html> Heading Embedded
Tags to import from
h1, h2, …, h6, hgroup other source like
Root element
image, audio, video
Section Phrasing
Body, section, nav, b, I, small, sub, sup and
article, header, footer, all text related tags 16
address
1] ROOT element - <html>
17
2] Metadata
No-
Base Meta script Style
18
Placed in head Less than 256
tag characters
Title
Base
20
Links one document to Placed as first element in
another <head>
link
<link
Attributes- href, hreflang, href="/media/examples/link-
media, rel, size, style element-example.css"
rel="stylesheet">
21
Provides Placed as first
information about element in
document <head>
meta
Attributes-
charset, contents, <meta charset="UTF-8">
http-equiv, name
22
New in HTML5,
Used with interactive
executes command
elements
when event is fired.
Command
<command
Attributes- type, label,
type="command"
icon, disabled,
label="Save"
checked, radiogroup,
onclick="save()">Sav
title
e</command>
23
used to display
alternative text if browser
Used in head, body tags
does not support
javascript or script
Noscript
<noscript>Your
browser does not
Attributes- supports
global attributes support
JavaScript!</noscript
>
24
used to embed a
Used inside
client-side script
head
(JavaScript)
script
<script>
Attributes- src, document.getElement
defer, type, ById("demo").innerHT
charset, async ML = "Hello JavaScript!";
</script>
25
used to apply a
simple style Used in head
sheet
style
<style>
Attributes- h1 {color:red;}
media, type p {color:blue;}
</style>
26
3] Section elements
Fundamental 27
body tag attributes
onredo Function to call when user moved forward in undo history HTML5
onundo Function to call when user moved backward in undo history HTML5
Output
Section tags 30
section tag example
Section tags 31
Output
article tag example
<!DOCTYPE html>
code
<html>
<head>
<title>Title of the document</title> </head>
<body>
<header> <h1>Programming Courses</h1> </header>
<nav>
<a href="/learn-html.html">HTML</a> |
<a href="/learn-css.html">CSS</a> |
<a href="/learn-javascript.html">JavaScript</a> | <a
href="/learn-php.html">PHP</a> |
</nav>
<h2>Welcome to W3Docs!</h2>
</body>
</html>
Section tags 32
Output
article tag example
<!DOCTYPE html>
code
<html>
<head>
<title>First page for SYCS</title> </head>
<body bgcolor="LightSalmon" text="brown">
<article>
<h1>Heading for Article 1</h1>
<p>Text that appears under article 2</p>
</article>
<article>
<h1>Heading for Article 2</h1>
<p>Text that appears under article 2</p>
</article>
</body>
</html>
Section tags 33
Output
header tag example
<!DOCTYPE html>
code
<html>
<head>
<title>Header Tag</title>
</head>
<body>
<article>
<header>
<h1>This is the heading.</h1>
<h4>This is the sub-heading.</h4>
<p>This is the metadata.</p>
</header>
</article>
</body>
</html>
Section tags 34
Output
footer tag example
<!DOCTYPE html>
code
<html>
<body>
<footer>
<p>Author: XYZ<br>
<a href="mailto:xyx@example.com"> XYZ
@example.com </a> </p>
</footer>
</body>
</html>
Section tags 35
Output
address tag example
<!DOCTYPE html>
code
<html>
<body>
<address>
You can contact us at:<br>
Mumbai<br>
400011.<br>
Maharashtra, India
</address>
</body>
</html>
Section tags 36
4] heading elements
<h1>
<h2>
<!DOCTYPE html>
<html>
<h3>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2> <h4>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5> <h5>
<h6>Heading 6</h6>
</body>
</html> <h6>
37
2.
Formatting Text in
HTML
List of tags to format text in HTML
42
Links and URL’s in HTML
Links in HTML
44
URL (uniform resource locator )
46
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Colspan & Rowspan Example</title>
</head>
<body>
<table border="1">
<tr>
<th>Column 1</th><th>Column 2</th>
<th>Column 3</th><th>Column 4</th>
</tr>
<tr>
<td rowspan="2">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td><td>Row 1 Cell 3</td>
<td>Row 1 Cell 4</td>
</tr>
<tr>
<td>Row 2 Cell 2</td><td>Row 2 Cell 3</td>
<td>Row 2 Cell 4</td>
</tr>
<tr> <td colspan="4">Row 3 Cell 1</td> </tr>
</table>
</body> 47
</html>
Table in HTML
48
Colors HTML
52
List using <select> (drop down list)
53
Example of <datalist>
54
Example for <meter> and <output>
55
Images on web pages
image formats
• gif (graphics interchange format)
• jpeg(joint photographic experts group)
• png (Portable Network Graphics)
image maps
• server side mapping
• client side mapping 56
Attributes of img tag
57
Server-side mapping
• HTML supports server-side image maps that can be used
within HTML forms. With such maps, an image is drawn,
and when the user clicks on it, the coordinates of the click
are sent to a server-side program.
• server-side image maps are appropriate if the URL needs
to be computed, the regions change frequently, or other
form data needs to be included with the request.
• If a server-side image map is used simply to select among
a static set of destination URLs
• The ismap attribute is a boolean attribute.
• It specifies that the image is part of a server-side image
map
58
59
Client-side mapping
.wav
Multimedia comes in .mp3
many different formats.
It can be almost .mp4
anything you can hear
or see, like images, .mpg
music, sound, videos, .wmv
records, films,
animations, and more. .avi.
62
Video formats
WMV .wmv WMV (Windows Media Video). Developed by Microsoft. Commonly used in video
cameras and TV hardware. Plays well on Windows computers, but not in web browsers.
QuickTi .mov QuickTime. Developed by Apple. Commonly used in video cameras and TV hardware.
me Plays well on Apple computers, but not in web browsers.
RealVid .rm RealVideo. Developed by Real Media to allow video streaming with low bandwidths.
eo .ram Does not play in web browsers.
Flash .swf Flash. Developed by Macromedia. Often requires an extra component (plug-in) to play in
.flv web browsers.
Ogg .ogg Theora Ogg. Developed by the Xiph.Org Foundation. Supported by HTML.
WebM .webm WebM. Developed by Mozilla, Opera, Adobe, and Google. Supported by HTML.
MPEG-4 .mp4 MP4. Developed by the Moving Pictures Expert Group. Commonly used in video
or MP4 cameras and TV hardware. Supported by all browsers and recommended by YouTube. 63
Audio file format
Format File Description
MIDI .mid MIDI (Musical Instrument Digital Interface). Main format for all electronic music devices like
.midi synthesizers and PC sound cards. MIDI files do not contain sound, but digital notes that
can be played by electronics. Plays well on all computers and music hardware, but not in
web browsers.
RealAudio .rm RealAudio. Developed by Real Media to allow streaming of audio with low bandwidths.
.ram Does not play in web browsers.
WMA .wma WMA (Windows Media Audio). Developed by Microsoft. Plays well on Windows computers,
but not in web browsers.
AAC .aac AAC (Advanced Audio Coding). Developed by Apple as the default format for iTunes. Plays
well on Apple computers, but not in web browsers.
WAV .wav WAV. Developed by IBM and Microsoft. Plays well on Windows, Macintosh, and Linux
operating systems. Supported by HTML.
Ogg .ogg Ogg. Developed by the Xiph.Org Foundation. Supported by HTML.
MP3 .mp3 MP3 files are actually the sound part of MPEG files. MP3 is the most popular format for
music players. Combines good compression (small files) with high quality. Supported by all
browsers.
64
MP4 .mp4 MP4 is a video format, but can also be used for audio. Supported by all browsers.
<video width="400" controls>
<audio controls>
<source src="horse.ogg" type="audio/ogg">
audio
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
65
Questions
▰ What is HTML?
▰ Explain the difference between HTML and HTML5.
▰ List the HTML tag having no end tag.
▰ Describe the fundamental elements in HTML .
▰ Explain how colors are used in HTML.
▰ Explain different table tags .
▰ Explain input element of form.
▰ Explain how to create drop down list in HTML form .
▰ Explain how to create data list in HTML.
▰ Explain server-side mapping of image with suitable example .
66
Questions –continued
▻ Image mapping
▻ Web page
▻ Browser
▻ Website
▻ Multimedia
▻ Web
▻ Web page
▻ Website
68
Practice / Practical help
https://www.practiceboard.com/
https://html-online.com/editor/
69
Project ideas for HTML
To-Do List
Tribute Page
Process Scrolls
Photo Album
Survey Page
71