SlideShare a Scribd company logo
1 of 29
Download to read offline
Web Development:
{ Images, Lists and Links}
Presented by:
Mr. Jhaun Paul G. Enriquez
SHS Faculty
Web Images and File Types
Web Development: Using HTML5 & CSS3 2
• Images enhance the appearance of web
pages
• Use images to:
– Add background color
– Help organize the web page
– Help clarify a point being made in the text
– Serve as links to other web pages or web sites
Web Images and File Types
Web Development: Using HTML5 & CSS3 3
• Graphics Interchange Format (.gif)
– Uses the LZW compression technique
– Displaying GIF Images:
• Non-interlaced – displayed one line at a time
• Interlaced – display as blurred then sharpens
– Allows transparent background
– Image loses some
detail and quality
Web Images and File Types
Web Development: Using HTML5 & CSS3 4
• Portable Network Graphics (.png)
– Lossless compressed file format
– Supports multiple colors and resolutions
– Patent –free alternative to GIF format
– Allows for variation in transparency
Web Images and File Types
Web Development: Using HTML5 & CSS3 5
• Joint Photographic Experts Group (.jpg)
– Uses a lossy compression technique
– Suited for images with smooth variations of tone
and color
– Use for images with many colors (>256) such as
photographs
Inserting Image on Web Pages
Web Development: Using HTML5 & CSS3 6
• Using <img> Element
– used to insert image on a web page
Attribute Function
src specifies the URL (web address) of the image
alt provides an alternate text for an image
style to specify the width and height of an image
Note: Always specify the width and height of an image. If width and
height are not specified, the page will flicker while the image loads.
Source: http://www.w3schools.com/html/html_images.asp
Inserting Image on Web pages
Web Development: Using HTML5 & CSS3 7
• Images in Another Folder
– Include the folder name if image is store in a
sub-folder
• Images in Another Server
– Some web sites store their images on image servers
Inserting Image on Web pages
Web Development: Using HTML5 & CSS3 8
• Using the <figure> Element
– Defines self-contained content, like illustrations,
diagrams, photos, code listings, etc.
SAMPLE CODE
• Using the <figcaption> Element
– Defines a caption for a <figure> element
OUTPUT
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 9
• Specify lists of information on web pages
• All lists must contain one or more list
elements
• Lists may contain the following:
– Unordered information
– Ordered information
– Definitions or Descriptions
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 10
• Using an Unordered List
– Starts with the <ul> tag
– Each list item starts with the <li> tag
– Marked with disc or bullets (default)
– Lists may also be circle, square or none
SAMPLE CODE OUTPUT
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 11
• Using an Ordered List
– starts with the <ol> tag
– Each list item starts with the <li> tag
– Marked with numbers (default)
– Lists may also be uppercase , lowercase , or roman
numerals (uppercase & lowercase)
SAMPLE CODE OUTPUT
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 12
• Attributes for <ol> and <ul> Elements
1. type* - defines the type of the list item marker
2. start* - specify the starting point of numbering
with the <ol> tag
SAMPLE CODES
Notes: These tags are
deprecated but
supported by HTML5
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 13
• Nested HTML Lists
– List can be nested (lists inside lists)
SAMPLE CODE OUTPUT
Using Lists to Present Content
Web Development: Using HTML5 & CSS3 14
• Using a Description List
– a list of terms with a description of each term
– Tags used:
• <dl> - defines the description list
• <dt> - defines the term (name)
• <dd> - describes each term
SAMPLE CODE OUTPUT
1. What are the three recommended image formats
for web pages?
2. What <img> attribute specifies the URL (web
address) of the image?
3. What tag defines a caption for a <figure> element?
4. What HTML element defines a list item for an
unordered and ordered list?
5. Which description list tags will you use if you are
to define the name of the term to be described?
Quick Learning Check:
• Using the sample given, create an web page that
shows a beef stew recipe.
• The <title> should be All About Recipes.
• The beef stew image should be inside a folder
named images.
• Use appropriate HTML5 Web Structure Tags for
your header, content and footer. The page
should contain 3 sections within an article.
• Use comment tags to indicate the content of the
web page.
• Save the file as recipe_surname.html
In-class Activity:
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 18
Text Link
Image
Link
Bookmark
Link
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 19
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 20
• Hyperlinks allow visitors to navigate within,
between and among websites
• Links are specified by the anchor tag (<a>)
• Syntax for the link:
<a href="url">linktext</a>
• Example for the link:
• <a href="http://www.santaisabel.edu.ph">Link</a>
• <a href="about.html">About</a>
• <a href="#"><image src="sunset.jpg"></a>
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 21
• Using Absolute and Relative Paths
– Path describes the location where the files can be
found
– Beginning location is called the root
• Absolute path – specify the exact address for the
file to which you are linking or displaying a graphic
– <a href="http://www.smec.org/info.html">Link</a>
• Relative path – specify location of a file relative to
its location of the file currently in use
– <a href="aboutus/history.html">Link</a>
– <a href="../download/forms.html">Link</a>
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 22
Understanding Absolute
and Relative Paths
– Which of the following are
relative to the index.html web
document?
– What would be the path if
aboutus.html would insert the
background.jpg image?
– What is the path if a link will be
created from the index.html to
the projector.html?
– How will the desktop.html insert
the companylogo.png into its
web page?
WebsiteProject
index.html
aboutus.html
images
companylogo.png
background.jpg
product
projector.html
desktop.html
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 23
Types of Hyperlinks
1. External link – resource from another web server
or web address
<a href="http://www.w3schools.com">W3Schools</a>
2. Local link – web document with the same website
<a href="forms/applynow.html">Apply Now!</a>
3. Bookmark link – allow readers to jump to specific
parts of a Web page
<a href="#tips">Visit useful tips section</a>
<h2 id="tips">Useful Tips</a>
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 24
• Attributes of an Anchor Tag:
• href – specifies the destination address of the
link
• id – defines the name of the current anchor tag
• target – define where to open the linked
document
 _self - Opens the linked document in the same
window/tab as it was clicked (this is default)
 _blank - Opens the linked document in a new
window or tab
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 25
• Email Address Link:
• allows you to link to email addresses
• simplest way to enable your web page visitors to
“talk back” to you
• Includes the recipient, subject and message body
<a href="mailto:author@domain.com">Email Us</a>
<a href="mailto:author@domain.com?subject =
Customer Inquiry & body = Dear Web Master,">
Email Us</a>
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 26
• Text Link Colors:
• An unvisited link is underlined and blue
• A visited link is underlined and purple
• An active link is underlined and red
• Image Link:
Note: border:0; is added to prevent IE9 (and earlier) from displaying
a border around the image (when the image is a link).
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 27
• Image Maps:
• Image with clickable areas
• Use the <map> tag to define an image map with
name attribute to create a relationship between
the image and the map
• Use <area> tags in a <map> tag to define the
clickable areas in the image-map
Creating Links on Web Pages
Web Development: Using HTML5 & CSS3 28
• Image Maps:
Source: http://www.w3schools.com/html/html_images.asp
In-class Activity:
Web Development: Using HTML5 & CSS3 29
• Create a web page that uses an image map of the
Philippines to show a brief information of three (3)
Philippine cities.
• The <title> tag should be Philippine Cities.
• The following should be present in the web page:
• An external link to the PAGASA Website that
opens in a new tab after clicking a PAGASA logo.
• A bookmark link to the different city information
• An email link to info@philcities.com
• Save the file as philmap_surname.html

More Related Content

What's hot

Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
Joseph Lewis
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
dilanie77
 
Web Design Notes
Web Design NotesWeb Design Notes
Web Design Notes
butest
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
faizibra
 

What's hot (20)

HTML5
HTML5 HTML5
HTML5
 
Html
HtmlHtml
Html
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Lecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block BuildingLecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block Building
 
How the Web Works Using HTML
How the Web Works Using HTMLHow the Web Works Using HTML
How the Web Works Using HTML
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Web Design Notes
Web Design NotesWeb Design Notes
Web Design Notes
 
Html 5
Html 5Html 5
Html 5
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Training HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPBTraining HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPB
 
Web development
Web developmentWeb development
Web development
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers work
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
HTML5 CSS3 Basics
HTML5 CSS3 Basics HTML5 CSS3 Basics
HTML5 CSS3 Basics
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
 

Similar to Images, lists and links

HTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).pptHTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).ppt
Dianajeon3
 
Intro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingIntro to SharePoint 2013 Branding
Intro to SharePoint 2013 Branding
Thomas Daly
 

Similar to Images, lists and links (20)

MTA html5 text_graphics_media
MTA html5 text_graphics_mediaMTA html5 text_graphics_media
MTA html5 text_graphics_media
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptx
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Basic html structure
Basic html structureBasic html structure
Basic html structure
 
gdsc-html-ppt.pptx
gdsc-html-ppt.pptxgdsc-html-ppt.pptx
gdsc-html-ppt.pptx
 
HTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).pptHTML_JavaScript_Malaysia_2008 (2).ppt
HTML_JavaScript_Malaysia_2008 (2).ppt
 
HTML & CSS: Chapter 03
HTML & CSS: Chapter 03HTML & CSS: Chapter 03
HTML & CSS: Chapter 03
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Html.ppt
Html.pptHtml.ppt
Html.ppt
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Css
CssCss
Css
 
Intro to SharePoint 2013 Branding
Intro to SharePoint 2013 BrandingIntro to SharePoint 2013 Branding
Intro to SharePoint 2013 Branding
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 
Developing Website.pptx
Developing Website.pptxDeveloping Website.pptx
Developing Website.pptx
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Images, lists and links

  • 1. Web Development: { Images, Lists and Links} Presented by: Mr. Jhaun Paul G. Enriquez SHS Faculty
  • 2. Web Images and File Types Web Development: Using HTML5 & CSS3 2 • Images enhance the appearance of web pages • Use images to: – Add background color – Help organize the web page – Help clarify a point being made in the text – Serve as links to other web pages or web sites
  • 3. Web Images and File Types Web Development: Using HTML5 & CSS3 3 • Graphics Interchange Format (.gif) – Uses the LZW compression technique – Displaying GIF Images: • Non-interlaced – displayed one line at a time • Interlaced – display as blurred then sharpens – Allows transparent background – Image loses some detail and quality
  • 4. Web Images and File Types Web Development: Using HTML5 & CSS3 4 • Portable Network Graphics (.png) – Lossless compressed file format – Supports multiple colors and resolutions – Patent –free alternative to GIF format – Allows for variation in transparency
  • 5. Web Images and File Types Web Development: Using HTML5 & CSS3 5 • Joint Photographic Experts Group (.jpg) – Uses a lossy compression technique – Suited for images with smooth variations of tone and color – Use for images with many colors (>256) such as photographs
  • 6. Inserting Image on Web Pages Web Development: Using HTML5 & CSS3 6 • Using <img> Element – used to insert image on a web page Attribute Function src specifies the URL (web address) of the image alt provides an alternate text for an image style to specify the width and height of an image Note: Always specify the width and height of an image. If width and height are not specified, the page will flicker while the image loads. Source: http://www.w3schools.com/html/html_images.asp
  • 7. Inserting Image on Web pages Web Development: Using HTML5 & CSS3 7 • Images in Another Folder – Include the folder name if image is store in a sub-folder • Images in Another Server – Some web sites store their images on image servers
  • 8. Inserting Image on Web pages Web Development: Using HTML5 & CSS3 8 • Using the <figure> Element – Defines self-contained content, like illustrations, diagrams, photos, code listings, etc. SAMPLE CODE • Using the <figcaption> Element – Defines a caption for a <figure> element OUTPUT
  • 9. Using Lists to Present Content Web Development: Using HTML5 & CSS3 9 • Specify lists of information on web pages • All lists must contain one or more list elements • Lists may contain the following: – Unordered information – Ordered information – Definitions or Descriptions
  • 10. Using Lists to Present Content Web Development: Using HTML5 & CSS3 10 • Using an Unordered List – Starts with the <ul> tag – Each list item starts with the <li> tag – Marked with disc or bullets (default) – Lists may also be circle, square or none SAMPLE CODE OUTPUT
  • 11. Using Lists to Present Content Web Development: Using HTML5 & CSS3 11 • Using an Ordered List – starts with the <ol> tag – Each list item starts with the <li> tag – Marked with numbers (default) – Lists may also be uppercase , lowercase , or roman numerals (uppercase & lowercase) SAMPLE CODE OUTPUT
  • 12. Using Lists to Present Content Web Development: Using HTML5 & CSS3 12 • Attributes for <ol> and <ul> Elements 1. type* - defines the type of the list item marker 2. start* - specify the starting point of numbering with the <ol> tag SAMPLE CODES Notes: These tags are deprecated but supported by HTML5
  • 13. Using Lists to Present Content Web Development: Using HTML5 & CSS3 13 • Nested HTML Lists – List can be nested (lists inside lists) SAMPLE CODE OUTPUT
  • 14. Using Lists to Present Content Web Development: Using HTML5 & CSS3 14 • Using a Description List – a list of terms with a description of each term – Tags used: • <dl> - defines the description list • <dt> - defines the term (name) • <dd> - describes each term SAMPLE CODE OUTPUT
  • 15. 1. What are the three recommended image formats for web pages? 2. What <img> attribute specifies the URL (web address) of the image? 3. What tag defines a caption for a <figure> element? 4. What HTML element defines a list item for an unordered and ordered list? 5. Which description list tags will you use if you are to define the name of the term to be described? Quick Learning Check:
  • 16. • Using the sample given, create an web page that shows a beef stew recipe. • The <title> should be All About Recipes. • The beef stew image should be inside a folder named images. • Use appropriate HTML5 Web Structure Tags for your header, content and footer. The page should contain 3 sections within an article. • Use comment tags to indicate the content of the web page. • Save the file as recipe_surname.html In-class Activity:
  • 17.
  • 18. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 18 Text Link Image Link Bookmark Link
  • 19. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 19
  • 20. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 20 • Hyperlinks allow visitors to navigate within, between and among websites • Links are specified by the anchor tag (<a>) • Syntax for the link: <a href="url">linktext</a> • Example for the link: • <a href="http://www.santaisabel.edu.ph">Link</a> • <a href="about.html">About</a> • <a href="#"><image src="sunset.jpg"></a>
  • 21. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 21 • Using Absolute and Relative Paths – Path describes the location where the files can be found – Beginning location is called the root • Absolute path – specify the exact address for the file to which you are linking or displaying a graphic – <a href="http://www.smec.org/info.html">Link</a> • Relative path – specify location of a file relative to its location of the file currently in use – <a href="aboutus/history.html">Link</a> – <a href="../download/forms.html">Link</a>
  • 22. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 22 Understanding Absolute and Relative Paths – Which of the following are relative to the index.html web document? – What would be the path if aboutus.html would insert the background.jpg image? – What is the path if a link will be created from the index.html to the projector.html? – How will the desktop.html insert the companylogo.png into its web page? WebsiteProject index.html aboutus.html images companylogo.png background.jpg product projector.html desktop.html
  • 23. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 23 Types of Hyperlinks 1. External link – resource from another web server or web address <a href="http://www.w3schools.com">W3Schools</a> 2. Local link – web document with the same website <a href="forms/applynow.html">Apply Now!</a> 3. Bookmark link – allow readers to jump to specific parts of a Web page <a href="#tips">Visit useful tips section</a> <h2 id="tips">Useful Tips</a>
  • 24. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 24 • Attributes of an Anchor Tag: • href – specifies the destination address of the link • id – defines the name of the current anchor tag • target – define where to open the linked document  _self - Opens the linked document in the same window/tab as it was clicked (this is default)  _blank - Opens the linked document in a new window or tab
  • 25. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 25 • Email Address Link: • allows you to link to email addresses • simplest way to enable your web page visitors to “talk back” to you • Includes the recipient, subject and message body <a href="mailto:author@domain.com">Email Us</a> <a href="mailto:author@domain.com?subject = Customer Inquiry & body = Dear Web Master,"> Email Us</a>
  • 26. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 26 • Text Link Colors: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red • Image Link: Note: border:0; is added to prevent IE9 (and earlier) from displaying a border around the image (when the image is a link).
  • 27. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 27 • Image Maps: • Image with clickable areas • Use the <map> tag to define an image map with name attribute to create a relationship between the image and the map • Use <area> tags in a <map> tag to define the clickable areas in the image-map
  • 28. Creating Links on Web Pages Web Development: Using HTML5 & CSS3 28 • Image Maps: Source: http://www.w3schools.com/html/html_images.asp
  • 29. In-class Activity: Web Development: Using HTML5 & CSS3 29 • Create a web page that uses an image map of the Philippines to show a brief information of three (3) Philippine cities. • The <title> tag should be Philippine Cities. • The following should be present in the web page: • An external link to the PAGASA Website that opens in a new tab after clicking a PAGASA logo. • A bookmark link to the different city information • An email link to info@philcities.com • Save the file as philmap_surname.html