Web Design Lecture 3 18-10-2022
Web Design Lecture 3 18-10-2022
College Of Informatics
Department of Information Technology
2022-2023
Lecture Three
Outline Of Lecture …...................................................Three
✓ Long quotations
✓ Short quotations
✓ Element formatting
✓ Meta tag
✓ Comment
✓ Link
✓ Relative
✓ Absolute
✓ Email
✓ Image
✓ Multimedia
✓ Audio
✓ video
1
Long quotation and short quotation?
2
❑ Emphasized text
Use the em element to indicate which part of a sentence should be
stressed or emphasized.
Syntax: <em>...</em>
❑ Important text
Syntax: <strong>...</strong>
Bold, Italic and Underline text 5
<code>...</code> Code
<var>...</var> Variable
<samp>...</samp> Program sample
<kbd> …</kbd> computer keyboard
Special Characters 9
Meta tag 10
❑ Instead user agents like browsers or web crawlers can read meta
tags.
The function of a meta element is to convey additional information
to a website, which facilitates the analysis of HTML files and makes
maintaining file contents easier.
Usage for Different Meta Tags
11
❑ The charset attribute is used to specify the character encoding of your content.
An HTML page can have only a single charset. For most web pages, you shoul
d use the UTF-8 character encoding.
Usage for Different Meta Tags
12
The width=device-width part sets the width of the page to follow the
screen-width of the device
The initial-scale=1.0 part sets the initial zoom level when the page is
first loaded by the browser.
HTML comments
14
❑ So any content placed with-in <!-- ... --> tags will be treated as
comment and will be completely ignored by the browser.
17
HTML Links 18
relative link
Download link
E-mail link
Absolute link is created when the href value is a fully qualified URL,
including:
✓ HTTP:// as the transfer protocol
✓ www.yourdomain.com as a domain name
✓ Page.html as a file name
Example:
<a href=“https://www.google.com"> Google</a>
Or
<a href="https://www.w3.org/standards/semanticweb”>
If both pages don’t in the same place or folder we use a file dir
ectory path with the file name and extension
• If we used to go from index.html to jon.html,use following
<a href=“profiles/jon.html>
go to jon</a>
Videopage nick.html
<a href=“profiles/nick.htm”
> Go to nick</a>
Relative link 23
<a href=“../videopage.html”
> videopage</a>
Download link 24
•These links are set up exactly the same as the absolute and relative
links.
Instead of “pointing” to another page or site, it points to a file.
Example:
<a href=“ WDLecture4.pdf ” download>
download lecture
</a>
Or
•The e-mail link is for receiving e-mail and feedback from visitors
<a href="mailto:[email protected]">
Contact Me!
</a>
***Note1 the mailto: in the HREF value.This is how the browser
detects an e-mail setting instead of a web page setting***
***Note2 You can also add set the subject, the subject line of an
e-mail can be filled in automatically by adding a SUBJECT property
as follows:
<a href="mailto:[email protected]?subject=lecture enqury"> contact
me for any question</a>
Images in HTML 27
27
Images in HTML 28
•Example:
–Relative <img src=”flower.jpg” >
–Relative<img src=“images/flower.jpg”>
–Absolute <img src="https://www.example.com/images/flower. jpg ">
•In the same way as with links, you can also add title attributes
to images to provide further supporting information if needed.
<img src="roseeee.jpg"
alt=" The flowers of the rose grow in many different colors, from the well-known red rose to
yellow roses and sometimes white or purple roses ">
Width and height 30
You can use the width and height attributes to specify the wid
th and height of your image
• There are four basic formats you will find on the Web.
• Each is denoted to the browser by a different suffix.
• .gif , .png , jpeg or .jpg , .bmp
•Examples:
Images, music, sound, videos, records, films, animations,….
•Controls: If this attribute is present, it will allow the user to control video playback, in
cluding volume, seeking, and pause/resume playback.
•Autoplay: This Boolean attribute if specified, the video will automatically begin to pla
y back as soon as it can do so without stopping to finish loading the data.
•Loop: This Boolean attribute if specified, will allow video automatically seek back to th
e start after reaching at the end.
•Height: This attribute specifies the height of the video's display area
•width: This attribute specifies the width of the video's display area
HTML Multimedia- audio 35