SlideShare una empresa de Scribd logo
1 de 31
Inserting and Working
with Images
Objectives
Evaluate image file types
Insert images
Insert a background image
Mark images as figures
Create a figure caption
Use images as links
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 2
Objectives (continued)
Create an image map
Define additional hotspots
Add a favicon and touch icons
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 3
Evaluate Image File Types
Images can be added to a web page
by linking to a separate file
Different image file types:
 Bitmap image: represented as a grid of
dots of specified colors
• e.g., JPG, GIF, and PNG
 Vector graphic: encoded as geometric
shapes
• e.g., SVG
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 4
Evaluate Image File Types
(continued)
Common file formats:
 JPG: optimized for many colors
• photographs
 GIF: optimized for areas with defined
borders, few colors
• Line drawings
• Supports transparent pixels
 PNG: allows user to specify opacity level
for areas
 SVG: no decrease in quality when scaled
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 5
Evaluate Image File Types
(continued)
Bitmap should be created and
formatted with its use on web in mind
 Created and displayed at set resolution
and size
Resolution: how close dots should be
in the output
 Measured in dots per inch (dpi)
 High resolution = more detail, large file
size
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 6
Evaluate Image File Types
(continued)
Size: length and width of image
 Pixels: individual dots that make up the
image
 Bitmaps display optimally at native size
 Scaling affects download time and image
quality
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 7
Insert Images
img element: used to add an image to
HTML document
 One-sided element
 Includes two attributes:
•src: path and filename to the image file
•alt: text to display if image is unavailable
 Inline element by default
• Can be wrapped in block element for
alignment purposes
• Can be within text, aligned to text baseline
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 8
Insert Images (continued)
Width and height attributes:
 Not required
 Can be used to specify the native
dimensions of an image
• Allow a visual user agent to maintain blank
space preserving the layout of the web page
 Always in pixels, no need to specify units
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 9
Insert Images (continued)
img elements and display
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 10
Insert a Background
Image
Image can be background of web
page or element
 Specify path and filename as value for
background property
 Important to maintain contrast between
background and text
 Specify background color in case image
not available or not supported
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 11
Insert a Background
Image (continued)
Tiling: displaying images repeatedly
 Used by user agents to fill screen space
Examples of syntax of background
property:
 background: url(“url goes here”)
 background-color
When property-value pairs conflict, the
one that occurs later in the rule takes
precedence
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 12
Insert a Background
Image (continued)
Code for background color and
image
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 13
Mark Images as Figures
figure element: used to mark images
that add information to a web page
 Semantic element
 Enables user agent to link figure element
contents to another location without
affecting information conveyed
Mark as a figure if the page would be
complete even if the figure is not
shown
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 14
Mark Images as Figures
(continued)
Code for fig and img elements
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 15
Create a Figure Caption
A figure caption provides context,
explantion, or credit.
A figure caption is different than alt
text.
 alt text should describe an image
without adding additional information
 Figure caption text can add information
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 16
Create a Figure Caption
(continued)
Use the figcaption element nested
in a figure element as shown below
title attribute specifies additional
image information
 Browsers display as floating text during
mouse over or alt text when not
specified
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 17
Use Images as Links
Images can be used as links
 Enclose img element within an a
element
Browsers typically add border around
linked image to display link state
 Use pseudo-classes to modify link state
colors
 Use CSS border property to remove the
border
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 18
Use Images as Links
(continued)
Examples of code for creating an img
element as a link
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 19
Create an Image Map
An image map is HTML code
associated with an image that
specifies one or more shapes using
sets of coordinates and provides a link
target for each shape
Each linked shape is known as a
hotspot
Shape values can be rect, poly, or
circle
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 20
Create an Image Map
(continued)
Coordinates are measured from the
top-left corner
Use third-party software to generate
the coordinates
Code for rect shape in an image
map
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 21
Define Additional Hotspots
rect coordinates based on top-left
corner and bottom-right corner of
shape
poly coordinates based on each
vertices in the shape
circle coordinates based on center
point and radius of the circle
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 22
Define Additional Hotspots
(continued)
Code for hotspots and resulting image
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 23
Insert a Favicon and Touch Icons
Favicon: icon associated with web
page in the address bar and on
bookmarks
 16 x 16 pixels
 Saved in .ico format
To specify for all pages of website,
place in root folder for the site
To specify for individual page use link
element
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 24
Insert a Favicon and Touch Icons
(continued)
Touch icon: displayed on users screen
when user creates a shortcut on a
mobile device
Characteristics of favicons and touch
icons shown below
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 25
Insert a Favicon and Touch Icons
(continued)
Code for favicon and resulting page
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 26
Insert a Favicon and Touch Icons
(continued)
Code and examples of touch icons
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 27
Summary
Bitmap images: represented as grid of
dots of specified colors
Vector graphic: encoded as geometric
shapes
Quality of image is determined by
resolution and size
Image types include JPEG, PNG, GIF,
and SVG
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 28
Summary (continued)
Use one sided img element to insert
image
 Uses src and alt attributes
background element used to insert a
background image, which browsers
tile by default
figure element: used to mark
images that add information to web
page
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 29
Summary (continued)
figcaption element can be used to
include figure caption, figcaption
element is nested within a figure
element
title attribute can also be used to
provide additional information about
an image
Images can be used as links when
enclosed in an a element
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 30
Summary (continued)
Image maps can be used to link
shapes (called hotspots) in an image
to different targets
Favicon is an icon associated with
web page and is displayed in the
address bar
Touch icons displayed when a user
saves a shortcut to a mobile device
HTML 5 and CSS 3, Illustrated, 2nd
Ed. 31

Más contenido relacionado

La actualidad más candente (20)

Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
 
A history of html
A history of htmlA history of html
A history of html
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Hyperlink
HyperlinkHyperlink
Hyperlink
 
Chapter 2 c#
Chapter 2 c#Chapter 2 c#
Chapter 2 c#
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
Css font properties
Css font propertiesCss font properties
Css font properties
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)
 
Html Frames
Html FramesHtml Frames
Html Frames
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notes
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
Html and css
Html and cssHtml and css
Html and css
 
C# Arrays
C# ArraysC# Arrays
C# Arrays
 
HTML Tags
HTML TagsHTML Tags
HTML Tags
 
GET and POST in PHP
GET and POST in PHPGET and POST in PHP
GET and POST in PHP
 
Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
3.2 javascript regex
3.2 javascript regex3.2 javascript regex
3.2 javascript regex
 
C# loops
C# loopsC# loops
C# loops
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 

Destacado

Organizing Content with Lists and Tables
Organizing Content with Lists and TablesOrganizing Content with Lists and Tables
Organizing Content with Lists and TablesNicole Ryan
 
Javascript programming using the document object model
Javascript programming using the document object modelJavascript programming using the document object model
Javascript programming using the document object modelNicole Ryan
 
Creating Visual Effects and Animation
Creating Visual Effects and AnimationCreating Visual Effects and Animation
Creating Visual Effects and AnimationNicole Ryan
 
Working with Video and Audio
Working with Video and AudioWorking with Video and Audio
Working with Video and AudioNicole Ryan
 
Creating and Processing Web Forms
Creating and Processing Web FormsCreating and Processing Web Forms
Creating and Processing Web FormsNicole Ryan
 
Structure Web Content
Structure Web ContentStructure Web Content
Structure Web ContentNicole Ryan
 

Destacado (6)

Organizing Content with Lists and Tables
Organizing Content with Lists and TablesOrganizing Content with Lists and Tables
Organizing Content with Lists and Tables
 
Javascript programming using the document object model
Javascript programming using the document object modelJavascript programming using the document object model
Javascript programming using the document object model
 
Creating Visual Effects and Animation
Creating Visual Effects and AnimationCreating Visual Effects and Animation
Creating Visual Effects and Animation
 
Working with Video and Audio
Working with Video and AudioWorking with Video and Audio
Working with Video and Audio
 
Creating and Processing Web Forms
Creating and Processing Web FormsCreating and Processing Web Forms
Creating and Processing Web Forms
 
Structure Web Content
Structure Web ContentStructure Web Content
Structure Web Content
 

Similar a Working with Images

Formatting text with CSS
Formatting text with CSSFormatting text with CSS
Formatting text with CSSNicole Ryan
 
HTML & CSS: Chapter 03
HTML & CSS: Chapter 03HTML & CSS: Chapter 03
HTML & CSS: Chapter 03Steve Guinan
 
HTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgroundsHTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgroundsGrayzon Gonzales, LPT
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntaxJayjZens
 
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation  Websites Session 7 by Muhammad Ehtisham SiddiquiBuilding Next Generation  Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham SiddiquiMuhammad Ehtisham Siddiqui
 
Chapter 2 - HTML5.pdf
Chapter 2 - HTML5.pdfChapter 2 - HTML5.pdf
Chapter 2 - HTML5.pdfMhndHTaani
 
Developing a Web Page
Developing a Web PageDeveloping a Web Page
Developing a Web PageFrank Fucile
 
About graphics-on-web
About graphics-on-webAbout graphics-on-web
About graphics-on-webTayyab Ahmed
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Nuzhat Memon
 
Chase.com Content Management Presentation
Chase.com Content Management PresentationChase.com Content Management Presentation
Chase.com Content Management PresentationAdam "AB" Bloom
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questionsVipul Naik
 
New Features of HTML 5.1 to Create More Flexible Web Experiences
New Features of HTML 5.1 to Create More Flexible Web ExperiencesNew Features of HTML 5.1 to Create More Flexible Web Experiences
New Features of HTML 5.1 to Create More Flexible Web ExperiencesRasin Bekkevold
 
Laying Out Elements with CSS
Laying Out Elements with CSSLaying Out Elements with CSS
Laying Out Elements with CSSNicole Ryan
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)Nuzhat Memon
 
MTA html5 text_graphics_media
MTA html5 text_graphics_mediaMTA html5 text_graphics_media
MTA html5 text_graphics_mediaDhairya Joshi
 
Creating Links
Creating LinksCreating Links
Creating LinksBravocash
 

Similar a Working with Images (20)

Formatting text with CSS
Formatting text with CSSFormatting text with CSS
Formatting text with CSS
 
HTML & CSS: Chapter 03
HTML & CSS: Chapter 03HTML & CSS: Chapter 03
HTML & CSS: Chapter 03
 
HTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgroundsHTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgrounds
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 
Dreamweaver Ch03
Dreamweaver Ch03Dreamweaver Ch03
Dreamweaver Ch03
 
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation  Websites Session 7 by Muhammad Ehtisham SiddiquiBuilding Next Generation  Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
 
CAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptxCAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptx
 
Chapter 2 - HTML5.pdf
Chapter 2 - HTML5.pdfChapter 2 - HTML5.pdf
Chapter 2 - HTML5.pdf
 
Developing a Web Page
Developing a Web PageDeveloping a Web Page
Developing a Web Page
 
About graphics-on-web
About graphics-on-webAbout graphics-on-web
About graphics-on-web
 
Web(chap2)
Web(chap2)Web(chap2)
Web(chap2)
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
 
Chase.com Content Management Presentation
Chase.com Content Management PresentationChase.com Content Management Presentation
Chase.com Content Management Presentation
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questions
 
New Features of HTML 5.1 to Create More Flexible Web Experiences
New Features of HTML 5.1 to Create More Flexible Web ExperiencesNew Features of HTML 5.1 to Create More Flexible Web Experiences
New Features of HTML 5.1 to Create More Flexible Web Experiences
 
Unit4
Unit4Unit4
Unit4
 
Laying Out Elements with CSS
Laying Out Elements with CSSLaying Out Elements with CSS
Laying Out Elements with CSS
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 2)
 
MTA html5 text_graphics_media
MTA html5 text_graphics_mediaMTA html5 text_graphics_media
MTA html5 text_graphics_media
 
Creating Links
Creating LinksCreating Links
Creating Links
 

Más de Nicole Ryan

Testing and Improving Performance
Testing and Improving PerformanceTesting and Improving Performance
Testing and Improving PerformanceNicole Ryan
 
Optimizing a website for search engines
Optimizing a website for search enginesOptimizing a website for search engines
Optimizing a website for search enginesNicole Ryan
 
Python Dictionaries and Sets
Python Dictionaries and SetsPython Dictionaries and Sets
Python Dictionaries and SetsNicole Ryan
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your websiteNicole Ryan
 
Working with Links
Working with LinksWorking with Links
Working with LinksNicole Ryan
 
Getting Started with CSS
Getting Started with CSSGetting Started with CSS
Getting Started with CSSNicole Ryan
 
Getting Started with your Website
Getting Started with your WebsiteGetting Started with your Website
Getting Started with your WebsiteNicole Ryan
 
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and AnimationChapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and AnimationNicole Ryan
 
Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Nicole Ryan
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: ModularityNicole Ryan
 
Programming Logic and Design: Arrays
Programming Logic and Design: ArraysProgramming Logic and Design: Arrays
Programming Logic and Design: ArraysNicole Ryan
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with DataNicole Ryan
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environmentNicole Ryan
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs staticNicole Ryan
 
Working with Databases and MySQL
Working with Databases and MySQLWorking with Databases and MySQL
Working with Databases and MySQLNicole Ryan
 
Using arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing informationUsing arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing informationNicole Ryan
 
Tables and forms accessibility and microformats
Tables and forms accessibility and microformatsTables and forms accessibility and microformats
Tables and forms accessibility and microformatsNicole Ryan
 
Creating and styling forms
Creating and styling formsCreating and styling forms
Creating and styling formsNicole Ryan
 
Creating and styling tables
Creating and styling tablesCreating and styling tables
Creating and styling tablesNicole Ryan
 

Más de Nicole Ryan (20)

Testing and Improving Performance
Testing and Improving PerformanceTesting and Improving Performance
Testing and Improving Performance
 
Optimizing a website for search engines
Optimizing a website for search enginesOptimizing a website for search engines
Optimizing a website for search engines
 
Inheritance
InheritanceInheritance
Inheritance
 
Python Dictionaries and Sets
Python Dictionaries and SetsPython Dictionaries and Sets
Python Dictionaries and Sets
 
Social media and your website
Social media and your websiteSocial media and your website
Social media and your website
 
Working with Links
Working with LinksWorking with Links
Working with Links
 
Getting Started with CSS
Getting Started with CSSGetting Started with CSS
Getting Started with CSS
 
Getting Started with your Website
Getting Started with your WebsiteGetting Started with your Website
Getting Started with your Website
 
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and AnimationChapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
 
Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: Modularity
 
Programming Logic and Design: Arrays
Programming Logic and Design: ArraysProgramming Logic and Design: Arrays
Programming Logic and Design: Arrays
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with Data
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environment
 
Dynamic vs static
Dynamic vs staticDynamic vs static
Dynamic vs static
 
Working with Databases and MySQL
Working with Databases and MySQLWorking with Databases and MySQL
Working with Databases and MySQL
 
Using arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing informationUsing arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing information
 
Tables and forms accessibility and microformats
Tables and forms accessibility and microformatsTables and forms accessibility and microformats
Tables and forms accessibility and microformats
 
Creating and styling forms
Creating and styling formsCreating and styling forms
Creating and styling forms
 
Creating and styling tables
Creating and styling tablesCreating and styling tables
Creating and styling tables
 

Último

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Último (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Working with Images

  • 2. Objectives Evaluate image file types Insert images Insert a background image Mark images as figures Create a figure caption Use images as links HTML 5 and CSS 3, Illustrated, 2nd Ed. 2
  • 3. Objectives (continued) Create an image map Define additional hotspots Add a favicon and touch icons HTML 5 and CSS 3, Illustrated, 2nd Ed. 3
  • 4. Evaluate Image File Types Images can be added to a web page by linking to a separate file Different image file types:  Bitmap image: represented as a grid of dots of specified colors • e.g., JPG, GIF, and PNG  Vector graphic: encoded as geometric shapes • e.g., SVG HTML 5 and CSS 3, Illustrated, 2nd Ed. 4
  • 5. Evaluate Image File Types (continued) Common file formats:  JPG: optimized for many colors • photographs  GIF: optimized for areas with defined borders, few colors • Line drawings • Supports transparent pixels  PNG: allows user to specify opacity level for areas  SVG: no decrease in quality when scaled HTML 5 and CSS 3, Illustrated, 2nd Ed. 5
  • 6. Evaluate Image File Types (continued) Bitmap should be created and formatted with its use on web in mind  Created and displayed at set resolution and size Resolution: how close dots should be in the output  Measured in dots per inch (dpi)  High resolution = more detail, large file size HTML 5 and CSS 3, Illustrated, 2nd Ed. 6
  • 7. Evaluate Image File Types (continued) Size: length and width of image  Pixels: individual dots that make up the image  Bitmaps display optimally at native size  Scaling affects download time and image quality HTML 5 and CSS 3, Illustrated, 2nd Ed. 7
  • 8. Insert Images img element: used to add an image to HTML document  One-sided element  Includes two attributes: •src: path and filename to the image file •alt: text to display if image is unavailable  Inline element by default • Can be wrapped in block element for alignment purposes • Can be within text, aligned to text baseline HTML 5 and CSS 3, Illustrated, 2nd Ed. 8
  • 9. Insert Images (continued) Width and height attributes:  Not required  Can be used to specify the native dimensions of an image • Allow a visual user agent to maintain blank space preserving the layout of the web page  Always in pixels, no need to specify units HTML 5 and CSS 3, Illustrated, 2nd Ed. 9
  • 10. Insert Images (continued) img elements and display HTML 5 and CSS 3, Illustrated, 2nd Ed. 10
  • 11. Insert a Background Image Image can be background of web page or element  Specify path and filename as value for background property  Important to maintain contrast between background and text  Specify background color in case image not available or not supported HTML 5 and CSS 3, Illustrated, 2nd Ed. 11
  • 12. Insert a Background Image (continued) Tiling: displaying images repeatedly  Used by user agents to fill screen space Examples of syntax of background property:  background: url(“url goes here”)  background-color When property-value pairs conflict, the one that occurs later in the rule takes precedence HTML 5 and CSS 3, Illustrated, 2nd Ed. 12
  • 13. Insert a Background Image (continued) Code for background color and image HTML 5 and CSS 3, Illustrated, 2nd Ed. 13
  • 14. Mark Images as Figures figure element: used to mark images that add information to a web page  Semantic element  Enables user agent to link figure element contents to another location without affecting information conveyed Mark as a figure if the page would be complete even if the figure is not shown HTML 5 and CSS 3, Illustrated, 2nd Ed. 14
  • 15. Mark Images as Figures (continued) Code for fig and img elements HTML 5 and CSS 3, Illustrated, 2nd Ed. 15
  • 16. Create a Figure Caption A figure caption provides context, explantion, or credit. A figure caption is different than alt text.  alt text should describe an image without adding additional information  Figure caption text can add information HTML 5 and CSS 3, Illustrated, 2nd Ed. 16
  • 17. Create a Figure Caption (continued) Use the figcaption element nested in a figure element as shown below title attribute specifies additional image information  Browsers display as floating text during mouse over or alt text when not specified HTML 5 and CSS 3, Illustrated, 2nd Ed. 17
  • 18. Use Images as Links Images can be used as links  Enclose img element within an a element Browsers typically add border around linked image to display link state  Use pseudo-classes to modify link state colors  Use CSS border property to remove the border HTML 5 and CSS 3, Illustrated, 2nd Ed. 18
  • 19. Use Images as Links (continued) Examples of code for creating an img element as a link HTML 5 and CSS 3, Illustrated, 2nd Ed. 19
  • 20. Create an Image Map An image map is HTML code associated with an image that specifies one or more shapes using sets of coordinates and provides a link target for each shape Each linked shape is known as a hotspot Shape values can be rect, poly, or circle HTML 5 and CSS 3, Illustrated, 2nd Ed. 20
  • 21. Create an Image Map (continued) Coordinates are measured from the top-left corner Use third-party software to generate the coordinates Code for rect shape in an image map HTML 5 and CSS 3, Illustrated, 2nd Ed. 21
  • 22. Define Additional Hotspots rect coordinates based on top-left corner and bottom-right corner of shape poly coordinates based on each vertices in the shape circle coordinates based on center point and radius of the circle HTML 5 and CSS 3, Illustrated, 2nd Ed. 22
  • 23. Define Additional Hotspots (continued) Code for hotspots and resulting image HTML 5 and CSS 3, Illustrated, 2nd Ed. 23
  • 24. Insert a Favicon and Touch Icons Favicon: icon associated with web page in the address bar and on bookmarks  16 x 16 pixels  Saved in .ico format To specify for all pages of website, place in root folder for the site To specify for individual page use link element HTML 5 and CSS 3, Illustrated, 2nd Ed. 24
  • 25. Insert a Favicon and Touch Icons (continued) Touch icon: displayed on users screen when user creates a shortcut on a mobile device Characteristics of favicons and touch icons shown below HTML 5 and CSS 3, Illustrated, 2nd Ed. 25
  • 26. Insert a Favicon and Touch Icons (continued) Code for favicon and resulting page HTML 5 and CSS 3, Illustrated, 2nd Ed. 26
  • 27. Insert a Favicon and Touch Icons (continued) Code and examples of touch icons HTML 5 and CSS 3, Illustrated, 2nd Ed. 27
  • 28. Summary Bitmap images: represented as grid of dots of specified colors Vector graphic: encoded as geometric shapes Quality of image is determined by resolution and size Image types include JPEG, PNG, GIF, and SVG HTML 5 and CSS 3, Illustrated, 2nd Ed. 28
  • 29. Summary (continued) Use one sided img element to insert image  Uses src and alt attributes background element used to insert a background image, which browsers tile by default figure element: used to mark images that add information to web page HTML 5 and CSS 3, Illustrated, 2nd Ed. 29
  • 30. Summary (continued) figcaption element can be used to include figure caption, figcaption element is nested within a figure element title attribute can also be used to provide additional information about an image Images can be used as links when enclosed in an a element HTML 5 and CSS 3, Illustrated, 2nd Ed. 30
  • 31. Summary (continued) Image maps can be used to link shapes (called hotspots) in an image to different targets Favicon is an icon associated with web page and is displayed in the address bar Touch icons displayed when a user saves a shortcut to a mobile device HTML 5 and CSS 3, Illustrated, 2nd Ed. 31