Professional Documents
Culture Documents
Web Engineering: Lists & Images
Web Engineering: Lists & Images
Lecture 03
Lists & Images
(HTML5 - III)
1
Block and Inline elements
• Block elements contain an entire large region of
content.
• Examples:
paragraphs, lists, table cells, div, section, header,
footer, ul etc.
• <ol>
<li> One </li>
<li> Two </li>
<li> Three </li>
</ol>
Type Attribute of Ordered List
• HTML provide several tags for displaying list.
• <ol type=“a”>
<li> One </li>
<li> Two </li>
<li> Three </li>
</ol>
• <ul>
<li> Four </li>
<li> Five </li>
<li> Six </li>
</ul>
Type Attribute of Unordered List
• HTML provide several tags for displaying list.
• <ul>
<li> Four </li>
<li> Five </li>
<ul>
<li> Four </li>
<li> Five </li>
<li> Six </li>
</ul>
<li> Six </li>
</ul>
Nested Unordered List
• Example
• <ol>
<li> One </li>
<li> Two </li>
<ol>
<li> One </li>
<li> Two </li>
<li> Three </li>
</ol>
<li> Three </li>
</ol>
EXAMPLE
• <ol>
<li> One </li>
<li> Two </li>
<ol start=“5”>
<li> One </li>
<li> Two </li>
<ol type=“i” start=“7”>
<li> One </li>
<li> Two </li>
<li> Three </li>
</ol>
<li> Three </li>
</ol>
<li> Three </li>
</ol>
12
Definition List
• Example:
• <dl>
<dt> One </dt>
<dd>The first non-zero number. </dd>
• Example:
<p>
The attackers set about acquiring the control over the
computers to be used in the attack. By scanning using Sscan
SW, a <bdo dir=“rtl”>large numbers of computers attached to
the Internet.</bdo> Once a computer with a weak security
scheme is identified, the attackers try a break-in.
</p>
14
EXAMPLE
• Example:
<p dir=“rtl”><bdo dir=“rtl”>
The attackers set about acquiring the control
over the computers to be used in the attack.
By scanning using Sscan SW, a large numbers
of computers attached to the Internet. Once a
computer with a weak security scheme is
identified, the attackers try a break-in.
</bdo></p>
15
Images
• Images are major part of websites.
• Example:
<body>
<h1> HTML Image </h1>
<img src=“images/sciss.png” width=“240”
height=“240” alt=“Picture of scissors”
title=“Running with these is not
recommended.” />
</body>
16
Link on a Images
<a href=“index.html” target=“_blank”><img
src=“images/image1.jpg”
width=“250”
height=“250”
alt=“alternative text”
/></a>
17
FLOWING TEXT AROUND AN IMAGE
• HTML IMG tag is inline element. Sometimes we want
to flow text around an image.
• Example:
<body>
<h1> HTML Image </h1>
<img src=“images/sciss.png” width=“240” height=“240”
alt=“Picture of scissors” title=“Running with these is
not recommended.” style=“float: left; margin-right:
10px; margin-botton: 5px; border: solid black 1px;” />
</body>
18
Embedding Audio
• HTML5 provides the simple powerful feature of adding
audio files on your web page.
• Example:
<p> Here’s a song: </p>
<audio id=“audio” controls autoplay loop>
<source
src=“media/song.m4a” type=“audio/x-acc” />
<source
src=“media/song.mp3” type=“audio/mpeg” />
<source
src=“media/song.ogg” type=“audio/ogg” />
</audio>
19
20
Embedding Video
• HTML5 provides the simple powerful feature of embedding
video files on your web page.
• Example:
<p> Here’s a song: </p>
<video id=“video” widht=“860” height=“480” controls autoplay
loop>
<source
src=“media/video.m4v” type=“video/mp4” />
<source
src=“media/video.webm” type=“video/webm” />
<source
src=“media/video.ogg” type=“video/ogg” />
</video>
21