HTML Next Steps
HTML Next Steps
Nextsteps
CONNECT
Write the attributes for ibe followingtags.
Tag Attributes
LEARN
You will learn about:
Creating a list on the web page • Creating hyperlinks
Inserting images - Inserting audio and video
TASK
You have formatted the text of the website for Mrs. Sharma. The different types of activitiesarestill
not clear. Organise or list the differentactivities under various categories. Insert imagesandcreate
links to move back to the top of the page.
Let us learn how to organise and enhance the appearance of websites.
100
TAG
MMENTS
co allow you to explain a document to improveits
comments are not visible in the clarity or provide other
formation. browser;they are only displayed when
iri HTML source code. These comments are useful in explaining an author's
viewingview. Comment tag is an empty tag.
oint of Note : Use text-formatting
P esample, < ! tags to enhance text-
for
LIST
CREATINGA
havelearnt and used lists in MS Word. It is a greatway to organise information.
supportsthe following types of lists:
HTML
Ordered list
Unordered list
Definitionlist or description list
ORDEREDLIST TAG
Orderedlist is a numbered list. It is used when the items have a specific order. The
listis enclosed within and tags.The list item tag, is used to add
to
individualitems the list. The default numberingstyle is 1, 2, 3, 4,
Followingare the attributesof the tag.
Table 7.1 tag attributes
Attribute Description Example
type It sets the type of numbering type
to be used for each list item.
The values can be: a, A, i, I
and 1.
start It allows you to startthe list start
from a different number or where a is any number
letter. It always accepts the type "a" start
integer value.
The list will start with c.
ACTIVITY
102
Hindi
nüflt
typ• —
Art Craft
cuitm
Painting
Calligraphy
cui type
Starters
and Salads
Baking
Snacks
<LI>Art andCraft</LI>
104
IMAGES
the look of the web page. It will add more meaning
imageswill enhance
visual meaning added to it. HTMLallows you to insert the
text will have
formats:
it. it-nage
Interchange Format
f0110. Graphics
Photographic Experts Group
EG: Joint
portable Network Graphics
JPNC.
is used to insert images. It is an empty tag. It has the following attributes:
tag
Table 7.4 < img> tag attributes
Description Example(s)
Attributes
It specifies the URL or the path of < img src=
etc
the image. The image can be stored /desktop/ activity .jpeg>
in any folder of your computeror it
ma be a link to a web a e.
the height and width of src= "art .jpeg"
height It specifies
<img
he ight= "300" >
and the image.
width The value can be expressed in < img src= "art .jpeg"
pixels or percentage. height= "30%" >
< img src= "art .jpeg"
width= "500" >
< img src= "art .jpeg"
width= "50%" >
align It specifies the alignment of the <img src= "art .jpeg"
al ign= "bottom" >
image. The image can be vertically
or horizontally aligned. < img src= "art .jpeg"
Values for vertical alignment: align= "right " >
top, bottom.
Values for horizontal alignment:
left, centre, right.
B default ima es are left ali ned.
border It specifies the width or the thickness <img src= "art .jpeg"
of the border around the image. The border= "6" >
105
Help Look Up
If you do not specify the height and width of the Snippet: a
of code small
image, it will be inserted in its actual size. designed
illustrate a to
Align and border attributesare not supported by HTML 5. specific
It is not essential to mention the complete path of the
image if it is in the same folder as the web page.
CTIVITY 4
A. If image is to be used as a background then which tag and attribute will you use?
Hint: background attribute of body tag
B. Can Activity Studio website be in Hindi? Write the code snippet.
.CTIVITY 5
Activity Studio
Tfiereispfenty to (o after
You will get the output as shown.
activities frontArt and Dance,
andspectficatimu
about "w for details
A Art &craft
Drawing
• Caffigrap/iy
• J(mver5taking
CanuCe *taking
3. Cooofing
CftocoCate
*taking
Starters
• Soups
andSafatG
small icon in
will find a
es,youimage.
f an the browser
cannot -Activity Studio
because the
using
image
It you gave.
Tfiere isprenty to do after
Activity Club fias a variety of
ath
p problem, put the image
Dance. EducatiotcLanguages.Sprts an' Adventure.and
the information 6ef0%'
for detaiCsand
of we this as your html
'Bcifteattoru our
HYPERLINKS IN HTML
CREATING
Awebsiteis a collection of web pages. These pages are linked to each other through
At times, a web page has text and images that take you to different web
hyperlinks.
Such text and images are hyperlinks.
pages.
aretwo types of links in HTML:
There
link: A link that connects two differentweb pages. When you click this link
External
anewweb page opens in the browser window.
link: A link that connects to another section on the same page.
Internal
youcanspecify the colours to hyperlinks by using the following attributes of the
body tag:
ACTIVITY
The web page has become too long. Create a link TOP at the bottom of the page to takethe
user back to the starting of the page.
<html>
<head>
<title> Activity Studio </title>
</head>
Cooking
"circle” >
zul type
Chocolate Making </li>
Starters </li>
Soups & Salads </li>
Baking </li>
</li>
(li> Desserts
Snacks </li>
< li >
dol >
<br> <br>
the
Jf you want to join
activityjoyride
o e
ride then contact C O FileI
Appl Free Sh&Ŕińt O Cisooń
the undersigned Activity Studio
align
Contact :
Mr. Rahul Verma
Phone:9599057107
ť after
<br>
< / html
> Ett•dŕyFy
Observe the link 'TOP' at the left corner of the web page.
A. Create a hyperlink to an email address.
To do so mailto: keyword has to be proceeded before the email address
of the
example,<a href — "mailto :activitystudio@gmail .com"
s recipient
Contact
B. Linkthe page you created with a page on the Internet.
Type the following code:
<a href - . Click here to search
for information
ACTIVITY 8
EMBEDDINGAUDIO
You can easily insert audio files in a web page. The <audi0> tag specifies
a
standard way to embed an audio file. In HTML 5, there are 3 supportedaudio
formats:
mp3: MPEG (Motion Picture Experts Group) Layer-3
wav: Waveform Audio File
ogg: from the jargon word logging'
110
are:
ttribUtes Table 7.7 <audi0>
flied tag attributes
Descri tion
Attributes le(s) Exam
It defines the URL or the <source src= "D: \ intro.
svc
address where the audio file mp3" >
is hosted.
It defines the file format. < source src= "D: \ intro .mp3"
type
type "audio/mp3" >
s It adds audio controls such <source src= "D:\intro .mp3"
control
as play, pause, volume. type = "audio/mp3" controls >
defines multiple media resources for media elements, such as
sourcetag It allows you to specify alternativeaudio/videofiles which
The
ide0> and
choose from. The browser will use the first recognised format.
thebrowsermay
VIDEO
EMBEDDING
The tag specifies a standard way to embed a video file. There are
video formats:
3 supported (MPEG) Layer-4
mp4:Moving Picture Experts Group
webM:Web Media
logging'
ogg:from the jargon word
Theattributes are: tag attributes
Table 7.8 <video>
Exam le(s)
Attributes Description
the address <source src= "D: \ intro .
src It defines the URL or
where the video file is hosted. .
<source src= "D: \ intro
type It defines the file format. "video/mp4
mp4" type
">
of <source src=
width and It sets the height and width intro .mp4"
height the video. If height and width width= " 320" height= " 240
">
flicker
are not set, the page may
while loading the video. <source src= "D: \ intro
.
such as "
controls It adds video controls mp4" type = "video/mp4
play, pause, volume. controls>
111
ACTIVITY 9
ACTIVITY10
Discuss:
'S} Different types of lists and their uses.
Different image formatsthat can be used in a web page.
RECAP
Commentsallow you to explain a documentto improve its clarity or provideother
information.
Ordered list is used when the items have a specific order. The default numberingstyleis
Unordered list is used when the items do not have a specific order.
Definition list is a list of terms followed by their description.
Adding images will enhance the look of the web page. Image can be insertedusing ta
112
comments
list
dere d
or
list
onordered
list
sested
erlink
HYP
link
'External
link
: Internal
ASSESS
Li,iÅ specifies the colour of the link that is not clicked even once.
4. The border attribute specifies an alternative text that the browser displays
if the image is loading or cannot be displayed.
4. What do you understand by hyperlink? Explain. What are the differenttypesof linking?
5. Jaya created a simple web page. Now she wants to add a logo, link a few pagesandadd
images. Can you suggest her the appropriate tags and their syntax?
APPLY
A. What will be the output of the following codes?
<html>
14
dit3C>
type
4/11 >
App e
Banana
Ii >
orange
< / 1 i >
papaya
/btrnl>
code to change the disc to square.
Rewritethe
2.
:
The movie clip is about the impact of Corona viz-us .
z p > zb>Note
z/b0dY>
z/html>
the error
B. Identify
in the following HTMLcode that attempts to show the list of sports/games
Write the correct code.
againsta red background.
<html>
115
following output.
D. Write the code for the
Balanced Diet
VitaminB
VitaminC
• VitarnmD
2. Minerals
Iron
e Iodine
16
desserts to be displayed in
course and pink colour
be visited link colour
should be black and
active link colour
message font size should be
page for your school. Include pictures and
a web hyperlinks.
6,
following features:
hasthe
designed to describe data, not to display data like HTML.
XMLwas
are not predefined.
XMLtags
programmerdefines his/her own tags.
The
a replacement for HTML.
XMLis not
in XML:
A code
>
(not e
<t0>Ashish</t0>
<from>Nimisha</from>
<heading>Meeting scheduled</heading>
Meeting scheduled on Aug 12, 9:20 a.m
</note>
Thetags like and <from> are not defined in any XML standard.These tags are created by the
programmer.
Thedifferencebetween XML and HTML is that the tags used in XML are defined by the programmer
andin HTML the tags are predefined.