Professional Documents
Culture Documents
REGION III
Schools Division of Cabanatuan City
Maharlika Highway, Cabanatuan City
10
Jayson M. Santos,LPT (Teacher I, Camp Tinio National High School)
To You, Learner:
Welcome to ICT 10 (Web Programming) Self-Learning Module (SLM) on insert link and
images in HTML . This module was made to give you with fun and meaningful time for guided
and independent learning at your convenience. You will be able to process the contents of this
Module while being an active learner.
To You, Parent/s, Guardian/s and Learning Facilitator/s:
This Module was collaboratively developed and reviewed by the teachers, school heads
and supervisors of DepEd Division of Cabanatuan City to assist you in helping the learners meet
the standards set by the K to 12 Curriculum while overcoming their different constraints in
schooling. As a facilitator, you are expected to orient the learners on how to use this module.
You also need to keep track of the learners' progress while allowing them to manage their own
learning. Furthermore, you are expected to encourage and assist the learners as they do the
tasks included in the module.
This module deals with skills and knowledge required to understand the issue of child
sexual exploitation by tourists and apply simple protective measures which are applicable and
appropriate for staff working in the hotel and travel industries. This will be the source of infor-
mation for them to acquire knowledge and skills in this particular competency independently
and at their own pace, with minimum supervision or help from their Teacher. It covers the infor-
mation and different activities to develop and assess the desirable values, skills and under-
standing of the learners to acquire the competency in promoting products and services to cus-
tomers . The goal of this module is the development of practical skills. To gain these skills, you
must learn the concepts and theory. Provisions for practical applications to real life situation are
also included for lifelong learning. This self-learning module designed to accomplish for one
week.
OBJECTIVES
COMPETENCY
2
WHAT DO YOU ALREADY KNOW?
Pre-Test Direction: Choose the letter of the best answer and write your answer on separate sheet
of paper.
9. To point to an image on another server, you must specify an _________ in the SRC attrib-
ute.
A. folder location B. absolute (full) URL
C. file location D. relative URL
10. What attribute provides an alternate text for an image?
A. alt B. src
C. href D. alternate
3
WHAT YOU NEED TO KNOW
HTML Links
Links are found in nearly all web pages. Links allow users to click their way from page to page.
HTML Links - Hyperlinks
HTML links are hyperlinks.
When you move the mouse over a link, the mouse arrow will turn into a little hand.
Note: A link does not have to be text. A link can be an image or any other HTML element.
<!DOCTYPE html>
<html>
<body>
<h1>HTML Links</h1>
<p><a href="https://www.facebook.com/">Visit
facebook.com!</a></p>
</body>
</html>
4
HTML Links - The target Attribute
By default, the linked page will be displayed in the current browser window. To change this, you
must specify another target for the link.
<!DOCTYPE html>
<html>
<body>
<h2>The target Attribute</h2>
<a href="https://www.facebook.com/" target="_blank">Visit Facebook!</a>
<p>If target="_blank", the link will open in a new browser window or tab.</p>
</body>
</html>
To use an image as a link, just put the <img> tag inside the <a> tag:
<!DOCTYPE html>
<html>
<body>
<h2>Image as a Link</h2>
<p>The image below is a link. Try to click on it.</p>
</body>
</html>
5
Button as a Link
To use an HTML button as a link, you have to add some JavaScript code.
JavaScript allows you to specify what happens at certain events, such as a click of a button:
<!DOCTYPE html>
<html>
<body>
<h2>Button as a Links</h2>
<p>Click the button to go to the HTML tutorial.</
p>
<button on-
click="document.location='default.asp'">HTML
Tutorial</button>
</body>
</html>
Link Titles
The title attribute specifies extra information about an element. The information is most often
shown as a tooltip text when the mouse moves over the element.
<!DOCTYPE html>
<html lang="en-US">
<body>
<h2>Link Titles</h2>
<p>The title attribute specifies extra information
about an element. The information is most often
shown as a tooltip text when the mouse moves
over the element.</p>
6
HTML Images
Images can improve the design and the appearance of a web page.
HTML Images Syntax
The HTML <img> tag is used to embed an image in a web page.
Images are not technically inserted into a web page; images are linked to web pages.
The <img> tag creates a holding space for the referenced image.
The <img> tag is empty, it contains attributes only, and does not have a closing tag.
The <img> tag has two required attributes:
src - Specifies the path to the image
alt - Specifies an alternate text for the image
Syntax
<img src="url" alt="alternatetext">
The src Attribute
The required src attribute specifies the path (URL) to the image.
Note: When a web page loads; it is the browser, at that moment, that gets the image
from a web server and inserts it into the page. Therefore, make sure that the image ac-
tually stays in the same spot in relation to the web page, otherwise your visitors will get a
broken link icon. The broken link icon and the alt text are shown if the browser cannot
find the image.
<!DOCTYPE html>
<html>
<body>
<h2>Alternative text</h2>
<p>The alt attribute should reflect the image
content, so users who cannot see the image
gets an understanding of what the image
contains:</p>
<img src="img_chania.jpg" alt="Flowers in
Chania" width="460" height="345">
</body>
</html>
7
The alt Attribute
The required alt attribute provides an alternate text for an image, if the user for some reason
cannot view it (because of slow connection, an error in the src attribute, or if the user uses a
screen reader).
<!DOCTYPE html>
<html>
<body>
<h2>Alternative text</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
img {
width: 100%;
</style>
</head>
<body>
<p>The first image uses the width attribute (set to 128 pixels), but the style in the head section overrides it, and sets
the width to 100%.</p>
<p>The second image uses the style attribute to set the width to 128 pixels, this will not be overridden by the style in
the head section:</p>
</body>
</html>
8
Images in Another Folder
If you have your images in a sub-folder, you must include the folder name in the src attribute:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
9
WHAT HAVE YOU LEARNED?
Post-Test
Direction: Write TRUE if the statement is correct and FALSE if the statement is incorrect.
Write your answer on separate sheet of paper.
ENRICHMENT ACTIVITY 1
Direction: On a separate sheet of paper, provide the use of the following tags/
attributes. (2 points each)
1.<a> 11._self
2.href 12._blank
3.target 13._parent
4.src 14._top
5.title 15.style
6. button on-click
7.alt
8.<img>
9. width
10.height
10
ENRICHMENT ACTIVITY 2
Direction: Using a mobile device or PC/Laptop, write the HTML codes of the image
below. Please provide the notepad/notepad ++ and Google Chrome Screenshot.(30
points)
1.Create some links to various search engines and facebook (Google, Yahoo, Face-
book and Instagram).
2. Create a link to your facebook account that should open in a new window.
3.Display five different images. Each image should have a title and alternate text.
4.Display an image that has a border of size 2, a width of 250, and a height of 250.
5.Display an image that when clicked will link to a search engine of your choice
(should be opened in a new window).
9
10
https://www.w3schools.com/
Royalty-Free Pictures and Illustrations
https://www.w3schools.com/
Online Source
REFERENCES
What Do You Already Know ? What Have You Learned?
1.A
2.C 1.False
3.B 2.False
4.A 3.True
5.D 4.True
6.B 5.False
7.c 6.True
8.D 7.True
9.B 8.True
10.A 9.True
ANSWER KEYS
Inserting Links and Images
<!DOCTYPE html>
<html>
<body>
<h2>Alternative text</h2>
</body>
</html>