Professional Documents
Culture Documents
01
Objective: To understand HTML basics for developing web applications
Description: HTML stands for Hyper Text Markup Language.HTML is the standard markup language
for creating Web pages. HTML describes the structure of a Web page. It consists of a series of elements
which tell the browser how to display the content. HTML elements label pieces of content such as "this is
a heading", "this is a paragraph", "this is a link", etc.
</body>
</html>
Example Explained
The <!DOCTYPE html> declaration defines that this document is an HTML5 document
The <html> element is the root element of an HTML page
The <head> element contains meta information about the HTML page
The <title> element specifies a title for the HTML page (which is shown in the browser's title bar
or in the page's tab)
The <body> element defines the document's body, and is a container for all the visible contents,
such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
The <h1> element defines a large heading
The <p> element defines a paragraph
Required Tools: Notepad Editor and Web Browser google chrome or Mozilla Firefox.
Methodology:
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
HTML Paragraphs
HTML paragraphs are defined with the <p> tag:
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
HTML Links
HTML links are defined with the <a> tag:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Links</h2>
<p>HTML links are defined with the a tag:</p>
</body>
</html>
HTML Images
HTML images are defined with the <img> tag. The source file (src), alternative text (alt), width,
and height are provided as attributes:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Images</h2>
<p>HTML images are defined with the img tag:</p>
<img src="image1.jpg" alt="image.com" width="104" height="142">
</body>
</html>
Lab Tasks:
2
Write a HTML code which display a animated
3 image.
Outcome / Summary:
Lab Rubrics
Level of Achievement
SN Components Proficient Acceptable Unacceptable Marks Achieved
0.25 0.15 0
Students have Student Student don’t
carefully read and understands understand
Problem
understood the problems and problem.
1 Understanding and
problem. Students analysis in an
Analysis
gives the idea to acceptable way
solve problem
Student Student
demonstrated an demonstrated
Student was familiar ability to use the little or no ability
with the software/hardware to perform
Ability to use software/hardware but required experiment and
2
software/hardware and required minimal assistance from required
help from the the instructor unreasonable
instructor to perform amount of
the experiment assistance from
instructor
The lab /tasks are The lab The lab in its
complete and completion is just current state is
Completeness and
3 accurate in the acceptable not
accuracy
context of implementable
implementation
Able to explain Able to explain Unable to
design/program/simul some explain
4 Q &A ation/fundamental design/program/si design/program/s
concepts correctly mulation/fundame imulation/funda
ntal concepts mental Concepts
Total (1)
Name & Signature of Teacher: ______________________________ Date:
_________________
Practical No. 02
Objective:
To become familiar with HTML Table elements.
Description:
HTML tables allow web developers to arrange data into rows and columns. HTML tables can have
borders of different styles and shapes. HTML tables can have different sizes for each column, row or the
entire table.
For example:
By using the style attribute with the width or height properties we can specify the size of a table, row or
column. HTML tables can adjust the padding inside the cells, and also the space between the cells.
Required Tools: Notepad Editor and Web Browser google chrome or Mozilla Firefox.
Methodology:
HTML Table:
Table Cells
<table>
<tr> Each table cell is defined by a <td> and
<th>Company</th> a </td> tag. td stands for table data.
<th>Contact</th>
<th>Country</th> Everything between <td> and </td> are the
</tr>
<tr> content of the table cell.
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td> <table>
<td>Germany</td> <tr>
</tr> <td>Emil</td>
<tr> <td>Tobias</td>
<td>Centro comercial Moctezuma</td> <td>Linus</td>
<td>Francisco Chang</td> </tr>
<td>Mexico</td> </table>
</tr>
</table>
Table Rows Table Headers
Each table row starts with a <tr> and ends with Sometimes you want your cells to be table header
a </tr> tag. cells. In those cases use the <th> tag instead of
the <td> tag:
tr stands for table row
th stands for table header
<table>
<tr> <table>
<td>Emil</td> <tr>
<td>Tobias</td> <th>Person 1</th>
<td>Linus</td> <th>Person 2</th>
</tr> <th>Person 3</th>
<tr> </tr>
<td>16</td> <tr>
<td>14</td> <td>Emil</td>
<td>10</td> <td>Tobias</td>
</tr> <td>Linus</td>
</table> </tr>
<tr>
<td>16</td>
<td>14</td>
<td>10</td>
</tr>
</table>
Tag Description
table, th, td {
Style Table Borders border: 1px solid white;
border-collapse: collapse;
If you set a background color of each cell, and }
give the border a white color (the same as the th, td {
document background), you get the impression of background-color: #96D4D4;
an invisible border: }
table, th, td {
Round Table Borders border: 1px solid black;
border-radius: 10px;
With the border-radius property, the borders get }
rounded corners:
th, td {
Dotted Table Borders
border-style: dotted;
With the border-style property, you can set the }
appearance of the border.
th, td {
Border Color With the border-color property, border-color: #96D4D4;
you can set the color of the border. }
<table style="width:100%">
Table Width <tr>
<th>Firstname</th>
To set the width of a table, add the style attribute <th>Lastname</th>
to the <table> element: <th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
<table style="width:100%">
Table Column Width <tr>
<th style="width:70%">Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
To set the size of a specific column, add <td>Jill</td>
the style attribute on a <th> or <td> element: <td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Lab Tasks:
Level of Achievement
SN Components Proficient Acceptable Unacceptable Marks Achieved
0.25 0.15 0
Students have Student Student don’t
carefully read and understands understand
Problem
understood the problems and problem.
1 Understanding and
problem. Students analysis in an
Analysis
gives the idea to acceptable way
solve problem
Student Student
demonstrated an demonstrated
Student was familiar ability to use the little or no ability
with the software/hardware to perform
Ability to use software/hardware but required experiment and
2
software/hardware and required minimal assistance from required
help from the the instructor unreasonable
instructor to perform amount of
the experiment assistance from
instructor
The lab /tasks are The lab The lab in its
complete and completion is just current state is
Completeness and
3 accurate in the acceptable not
accuracy
context of implementable
implementation
Able to explain Able to explain Unable to
design/program/simul some explain
4 Q &A ation/fundamental design/program/si design/program/s
concepts correctly mulation/fundame imulation/funda
ntal concepts mental Concepts
Total (1)
Name & Signature of Teacher: ______________________________ Date:
_________________
Practical No. 03
Objective: To become familiar with list in HTML
Description: HTML, we can list items either in an ordered or unordered fashion. An ordered list uses
numbers or some sort of notation that indicates a series of items. For example, an ordered list can start
with number 1, and continue through 2, 3, 4, and so on. Your ordered list can also start with the letter A
and go through B, C, D, and so on.
Required Tools: Notepad Editor and Web Browser google chrome or Mozilla Firefox.
Methodology:
An Ordered List with HTML
In HTML, we can create an ordered list using the <ol> tag. The ol in the tag stands for an ordered list.
Inside each of the ordered list elements <ol> and <ol />, we have to define the list items. We can define
the list items using the <li> tag.
Here is the complete HTML structure for an ordered list:
<ol>
1. Eat
<li>Eat</li> 2. Code
<li>Code</li> 3. Sleep
<li>Sleep</li>
</ol>
So, we have the list of elements ordered with a number starting with 1 and incremented to 2 and 3.
Types of Ordered Lists in HTML: To order using the alphabet like A, B, C or a,b,c. You can do these
by specifying the value of the type attribute of the <ol> tag.
You can order the list using A, B, C letters by passing A as the type value.
<ol type="A">
The output looks like this:
<li>Eat</li>
A. Eat
<li>Code</li>
<li>Sleep</li> B. Code
</ol>
C. Sleep
Similarly, you can use lower case letters like a as the type value to list the elements with a, b, c, and so
on.
<ol type="a">
Here's the output:
<li>Eat</li>
a. Eat
<li>Code</li>
b. Code
<li>Sleep</li> c. Sleep
</ol>
If you want to use Roman numerals, use the value I for an ordered list with Roman numerals:
<ol type="I">
Here's the output:
<li>Eat</li>
I. Eat
<li>Code</li>
II. Code
<li>Sleep</li> III. Sleep
</ol>
<li>Eat</li>
Eat
<li>Code</li>
Code
<li>Sleep</li> Sleep
</ol>
<dt>Coffee</dt>
Coffee
<dd>- black hot drink</dd>
<dt>Milk</dt> - black hot drink
<dd>- white cold drink</dd> Milk
- white cold drink
</dl>
Lab Tasks:
Outcome / Summary:
Lab Rubrics
Level of Achievement
SN Components Proficient Acceptable Unacceptable Marks Achieved
0.25 0.15 0
Students have Student Student don’t
carefully read and understands understand
Problem
understood the problems and problem.
1 Understanding and
problem. Students analysis in an
Analysis
gives the idea to acceptable way
solve problem
Student Student
demonstrated an demonstrated
Student was familiar ability to use the little or no ability
with the software/hardware to perform
Ability to use software/hardware but required experiment and
2
software/hardware and required minimal assistance from required
help from the the instructor unreasonable
instructor to perform amount of
the experiment assistance from
instructor
The lab /tasks are The lab The lab in its
complete and completion is just current state is
Completeness and
3 accurate in the acceptable not
accuracy
context of implementable
implementation
Able to explain Able to explain Unable to
design/program/simul some explain
4 Q &A ation/fundamental design/program/si design/program/s
concepts correctly mulation/fundame imulation/funda
ntal concepts mental Concepts
Total (1)
Name & Signature of Teacher: ______________________________ Date:
_________________
Practical No. 04
Objective: To become familiar with block and inline elements
Description:
Block Elements
Block elements appear on the screen as if they have a line break before and after them. For example, the
<p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <ul>, <ol>, <dl>, <pre>, <hr />, <blockquote>, and
<address> elements are all block level elements. They all start on their own new line, and anything that
follows them appears on its own new line.
Inline Elements
Inline elements, on the other hand, can appear within sentences and do not have to appear on a new line
of their own. The <b>, <i>, <u>, <em>, <strong>, <sup>, <sub>, <big>, <small>, <li>, <ins>, <del>,
<code>, <cite>, <dfn>, <kbd>, and <var> elements are all inline elements.
Grouping HTML Elements
There are two important tags which we use very frequently to group various other HTML tags (i) <div>
tag and (ii) <span> tag
I. The <div> tag
This is the very important block level tag which plays a big role in grouping various other HTML tags
and applying CSS on group of elements. Even now <div> tag can be used to create webpage layout where
we define different parts (Left, Right, Top etc.) of the page using <div> tag. This tag does not provide any
visual change on the block but this has more meaning when it is used with CSS.
II. The <span> tag
The HTML <span> is an inline element and it can be used to group inline-elements in an HTML
document. This tag also does not provide any visual change on the block but has more meaning when it is
used with CSS.
The difference between the <span> tag and the <div> tag is that the <span> tag is used with inline
elements whereas the <div> tag is used with block-level elements.
The diagram below shows the difference between a block flow with 3 blocks and an inline flow with 3
inlines.
Required Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
Methodology:
Following is a simple example of <div> tag. We will learn Cascading Style Sheet (CSS) in a separate
chapter but we used it here to show the usage of <div> tag
<!DOCTYPE html>
<html>
<head>
<title>HTML div Tag</title>
</head>
<body>
<!-- First group of tags -->
<div style = "color:red">
<h4>This is first group</h4>
<p>Following is a list of vegetables</p>
<ul>
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ul>
</div>
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Mango</li>
<li>Strawberry</li>
</ul>
</div>
</body>
</html>
Example
Following is a simple example of <span> tag. We will learn Cascading Style Sheet (CSS) in a separate
chapter but we used it here to show the usage of <span> tag −
<!DOCTYPE html>
<html>
<head>
<title>HTML span Tag</title>
</head>
<body>
<p>This is <span style = "color:red">red</span> and this is
<span style = "color:green">green</span></p>
</body>
</html>
Lab Tasks:
Outcome / Summary:
Lab Rubrics
Level of Achievement
SN Components Proficient Acceptable Unacceptable Marks Achieved
0.25 0.15 0
Students have Student Student don’t
carefully read and understands understand
Problem
understood the problems and problem.
1 Understanding and
problem. Students analysis in an
Analysis
gives the idea to acceptable way
solve problem
Student Student
demonstrated an demonstrated
Student was familiar ability to use the little or no ability
with the software/hardware to perform
Ability to use software/hardware but required experiment and
2
software/hardware and required minimal assistance from required
help from the the instructor unreasonable
instructor to perform amount of
the experiment assistance from
instructor
The lab /tasks are The lab The lab in its
complete and completion is just current state is
Completeness and
3 accurate in the acceptable not
accuracy
context of implementable
implementation
Able to explain Able to explain Unable to
design/program/simul some explain
4 Q &A ation/fundamental design/program/si design/program/s
concepts correctly mulation/fundame imulation/funda
ntal concepts mental Concepts
Total (1)
Name & Signature of Teacher: ______________________________ Date:
_________________
Practical No. 05
Objective: To Become familiar with HTML5 semantic and multimedia elements
Description:
Semantic Elements in HTML
A semantic element clearly describes its meaning to both the browser and the developer. Examples
of non-semantic elements: <div> and <span> Tells nothing about its content. Example of
semantic elements: <form>, <table>, and <article> - Clearly defines its content. A semantic Web allows
data to be shared and reused across applications, enterprises, and communities." Many web sites contain
HTML code like: <div id="nav"> <div class="header"> <div id="footer"> to indicate navigation, header,
and footer.
In HTML there are some semantic elements that can be used to define different parts of a web page:
<article>
<aside>
<details>
<figcaption>
<figure>
<footer>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
Methodology:
HTML <section> Element: The <section> element defines a section in a document. "A section is a
thematic grouping of content, typically with a heading."
Chapters
Introduction
News items
Contact information
A web page could normally be split into sections for introduction, content, and contact information.
An article should make sense on its own, and it should be possible to distribute it independently from the
rest of the web site.
Examples of where the <article> element can be used:
Forum posts
Blog posts
User comments
Product cards
Newspaper articles
The <header> element represents a container for introductory content or a set of navigational links.
A <header> element typically contains:
Note: You can have several <header> elements in one HTML document. However, <header> cannot be
placed within a <footer>, <address> or another <header> element.
Tag Description
HTML Video
Just like the <img> tag, <video> takes an src attribute with which you need to specify the source of the
video.
<video src="weekend.mp4"></video> By default, it is displayed like an image in the browser:
The HTML <video> Element
To show a video in HTML, use the <video> element:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
The controls attribute adds video controls, like play, pause, and volume. It is a good idea to always
include width and height attributes. If height and width are not set, the page might flicker while the video
loads. The <source> element allows you to specify alternative video files which the browser may choose
from. The browser will use the first recognized format. The text between the <video> and </video> tags
will only be displayed in browsers that do not support the <video> element.
Add muted after autoplay to let your video start playing automatically (but muted):
Example
<video width="320" height="240" autoplay muted>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
The HTML <audio> Element
Example
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.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.
Example
<audio controls autoplay>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Example
<audio controls autoplay muted>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
HTML YouTube Videos
Playing a YouTube Video in HTML
You can let your video start playing automatically when a user visits the page, by adding autoplay=1 to
the YouTube URL. However, automatically starting a video is annoying for your visitors!
Note: Chromium browsers do not allow autoplay in most cases. However, muted autoplay is always
allowed.
Add mute=1 after autoplay=1 to let your video start playing automatically (but muted).
<head>
<title>HTML embed Tag</title>
</head>
<body>
<bgsound src = "/html/yourfile.mid">
<noembed><img src = "yourimage.gif" ></noembed>
</bgsound>
</body>
</html>
This will produce the blank screen. This tag does not display any component and remains hidden.
Internet Explorer can also handle only three different sound format files − wav, the native format for PCs;
au, the native format for most Unix workstations; and MIDI, a universal music-encoding scheme.
Lab Tasks:
Outcome / Summary:
Lab Rubrics
Level of Achievement
SN Components Proficient Acceptable Unacceptable Marks Achieved
0.25 0.15 0
Students have Student Student don’t
carefully read and understands understand
Problem
understood the problems and problem.
1 Understanding and
problem. Students analysis in an
Analysis
gives the idea to acceptable way
solve problem
Student Student
demonstrated an demonstrated
Student was familiar ability to use the little or no ability
with the software/hardware to perform
Ability to use software/hardware but required experiment and
2
software/hardware and required minimal assistance from required
help from the the instructor unreasonable
instructor to perform amount of
the experiment assistance from
instructor
The lab /tasks are The lab The lab in its
complete and completion is just current state is
Completeness and
3 accurate in the acceptable not
accuracy
context of implementable
implementation
Able to explain Able to explain Unable to
design/program/simul some explain
4 Q &A ation/fundamental design/program/si design/program/s
concepts correctly mulation/fundame imulation/funda
ntal concepts mental Concepts
Total (1)
Name & Signature of Teacher: ______________________________ Date:
_________________