SlideShare a Scribd company logo
HTML PROGRAMMING
Lesson 4: Adding images
Lesson Objectives
 By the end of this lesson:
 All students will be able to add an image to an
HTML document
 Most students will be able to alter the size that an
image is displayed in HTML
 Some students will be able to use two images
and create a rollover
Starter
 You need to copy some images into your
HTML folder
 It is IMPORTANT that they only go in this
folder and nowhere else – OTHERWISE they
will not work!
How to add an image...
 Adding an image in HTML
is more complicated than it
sounds, but the best way
to learn is to try it for
yourself.
 Type in the code that has
been provided
 Save your work as
image.htm and then
preview your work in
internet Explorer
 If you manage to do this,
try changing the size of the
border of the image – what
happens?
<html>
<body>
<h2>Alan Shearer is a
legend</h2>
<img border="0"
src="shearer.jpg"
alt=“shearer2" width="304"
height="228" />
</body>
</html>
How to set the size of an
image...
 It is better to set the size of
the image you wish to use
to make sure that it
displays properly
 You can see that you have
already set the width and
height of the image you
have used
 Try changing the size of
your image to make it
much bigger, what
happens?
<html>
<body>
<h2>Alan Shearer is a
legend</h2>
<img border=“0”
src=“shearer.jpg”
alt=“shearer2” width="304"
height="228" />
</body>
</html>
Using rollover images...
 A nice feature of some
websites is the use of
rollover images
 A rollover image is when
the user scrolls over the
image and it changes to a
different image
 Change your code to
match the code shown
 Save it as rollover.htm and
then test it in Internet
Explorer
<html>
<body>
<h2>Alan Shearer is a legend</h2>
<a href="#" >
<img src="shearer.jpg"
<img border="0" src="shearer.jpg"
width="304" height="228"
onmouseover="this.src='shearer.jpg'"
onmouseout="this.src='shearer2.jpg'"
/></a>
</body>
</html>
Your task...
 Using your Newcastle.htm file that you have
been working on, you need to:
 Add the Newcastle1.jpg Image to your webpage
 Set the size of the image to be 250 x 188
 Use the Newcastle2.jpg and Newcastle3.jpg
Images to create a rollover image
 Save your work and preview it in Internet
Explorer to see if everything works
Plenary...
 You have just done something pretty
complicated in creating a rollover image, but
what do you think are the problems with using
a rollover image on a webpage?
 Update you HTML tag table to describe the
following:
 Onmouseover
 Onmouseout
Summary
 In this lesson you have:
 Added an image to an HTML document
 Altered the size that an image is displayed in
HTML
 Used two images to create a rollover

More Related Content

What's hot

Social Media Workshop - Word Press
Social Media Workshop - Word PressSocial Media Workshop - Word Press
Social Media Workshop - Word Press
Romany Thresher
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Codecamp Romania
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 
Freeformers starting to code
Freeformers starting to codeFreeformers starting to code
Freeformers starting to code
Max Bye
 
Theming Wordpress for Your Showcases
Theming Wordpress for Your ShowcasesTheming Wordpress for Your Showcases
Theming Wordpress for Your Showcases
Jun Hu
 
Ready the Technology
Ready the TechnologyReady the Technology
Ready the Technology
jhucte
 

What's hot (20)

Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
 
How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2
 
The WordPress Author
The WordPress AuthorThe WordPress Author
The WordPress Author
 
Schipul Webinar - Intro To Wordpress
Schipul Webinar - Intro To WordpressSchipul Webinar - Intro To Wordpress
Schipul Webinar - Intro To Wordpress
 
Social Media Workshop - Word Press
Social Media Workshop - Word PressSocial Media Workshop - Word Press
Social Media Workshop - Word Press
 
Easy steps to start a blog page in word press
Easy steps to start a blog page in word pressEasy steps to start a blog page in word press
Easy steps to start a blog page in word press
 
Key learnings from hosting 1000+ WordPress sites
Key learnings from hosting 1000+ WordPress sitesKey learnings from hosting 1000+ WordPress sites
Key learnings from hosting 1000+ WordPress sites
 
Website template ct002
Website template ct002Website template ct002
Website template ct002
 
Jquery tutorial
Jquery tutorialJquery tutorial
Jquery tutorial
 
SEO for WordPress Blogs
SEO for WordPress BlogsSEO for WordPress Blogs
SEO for WordPress Blogs
 
Create website using open source CMS WordPress by swapnil chafale
Create website using open source CMS WordPress by swapnil chafaleCreate website using open source CMS WordPress by swapnil chafale
Create website using open source CMS WordPress by swapnil chafale
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
 
Word Press
Word PressWord Press
Word Press
 
Freeformers starting to code
Freeformers starting to codeFreeformers starting to code
Freeformers starting to code
 
Theming Wordpress for Your Showcases
Theming Wordpress for Your ShowcasesTheming Wordpress for Your Showcases
Theming Wordpress for Your Showcases
 
How to Automatically Backup Your WordPress Site to Google Drive
How to Automatically Backup Your WordPress Site to Google DriveHow to Automatically Backup Your WordPress Site to Google Drive
How to Automatically Backup Your WordPress Site to Google Drive
 
Practical Blogs for Writers
Practical Blogs for WritersPractical Blogs for Writers
Practical Blogs for Writers
 
Ready the Technology
Ready the TechnologyReady the Technology
Ready the Technology
 

Viewers also liked (12)

Resume
ResumeResume
Resume
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Lesson 6
Lesson 6Lesson 6
Lesson 6
 
Como hackear un facebook 2015-2016
Como hackear un facebook 2015-2016Como hackear un facebook 2015-2016
Como hackear un facebook 2015-2016
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
Lesson 5
Lesson 5Lesson 5
Lesson 5
 
Katalog akcesoriów do sesji zdjęciowych i fotobudki
Katalog akcesoriów do sesji zdjęciowych i fotobudkiKatalog akcesoriów do sesji zdjęciowych i fotobudki
Katalog akcesoriów do sesji zdjęciowych i fotobudki
 
Qnt 351 team a week 2 p-pfinal
Qnt 351 team a week 2 p-pfinalQnt 351 team a week 2 p-pfinal
Qnt 351 team a week 2 p-pfinal
 
Senior Physical Fitness Test
Senior Physical Fitness TestSenior Physical Fitness Test
Senior Physical Fitness Test
 
Visual Impairment and Motor Development
Visual Impairment and Motor DevelopmentVisual Impairment and Motor Development
Visual Impairment and Motor Development
 
The history of mobile phones
The history of mobile phonesThe history of mobile phones
The history of mobile phones
 

Similar to Lesson 4

Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
Thinkful
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
Thinkful
 

Similar to Lesson 4 (20)

html5_css3
html5_css3html5_css3
html5_css3
 
Web 101 intro to html
Web 101  intro to htmlWeb 101  intro to html
Web 101 intro to html
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
The ABCs of HTML
The ABCs of HTMLThe ABCs of HTML
The ABCs of HTML
 
Web htmlt2
Web   htmlt2Web   htmlt2
Web htmlt2
 
CAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptxCAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptx
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web components
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
BASIC HTML
BASIC HTMLBASIC HTML
BASIC HTML
 
Chapter 2.pdf
Chapter 2.pdfChapter 2.pdf
Chapter 2.pdf
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx
 
Html images and html backgrounds
Html images and html backgroundsHtml images and html backgrounds
Html images and html backgrounds
 
Revolver
RevolverRevolver
Revolver
 
The web context
The web contextThe web context
The web context
 
[PSU Web 2011] HTML5 Design
[PSU Web 2011] HTML5 Design[PSU Web 2011] HTML5 Design
[PSU Web 2011] HTML5 Design
 
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayWorld 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
 

Recently uploaded

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 

Lesson 4

  • 2. Lesson Objectives  By the end of this lesson:  All students will be able to add an image to an HTML document  Most students will be able to alter the size that an image is displayed in HTML  Some students will be able to use two images and create a rollover
  • 3. Starter  You need to copy some images into your HTML folder  It is IMPORTANT that they only go in this folder and nowhere else – OTHERWISE they will not work!
  • 4. How to add an image...  Adding an image in HTML is more complicated than it sounds, but the best way to learn is to try it for yourself.  Type in the code that has been provided  Save your work as image.htm and then preview your work in internet Explorer  If you manage to do this, try changing the size of the border of the image – what happens? <html> <body> <h2>Alan Shearer is a legend</h2> <img border="0" src="shearer.jpg" alt=“shearer2" width="304" height="228" /> </body> </html>
  • 5. How to set the size of an image...  It is better to set the size of the image you wish to use to make sure that it displays properly  You can see that you have already set the width and height of the image you have used  Try changing the size of your image to make it much bigger, what happens? <html> <body> <h2>Alan Shearer is a legend</h2> <img border=“0” src=“shearer.jpg” alt=“shearer2” width="304" height="228" /> </body> </html>
  • 6. Using rollover images...  A nice feature of some websites is the use of rollover images  A rollover image is when the user scrolls over the image and it changes to a different image  Change your code to match the code shown  Save it as rollover.htm and then test it in Internet Explorer <html> <body> <h2>Alan Shearer is a legend</h2> <a href="#" > <img src="shearer.jpg" <img border="0" src="shearer.jpg" width="304" height="228" onmouseover="this.src='shearer.jpg'" onmouseout="this.src='shearer2.jpg'" /></a> </body> </html>
  • 7. Your task...  Using your Newcastle.htm file that you have been working on, you need to:  Add the Newcastle1.jpg Image to your webpage  Set the size of the image to be 250 x 188  Use the Newcastle2.jpg and Newcastle3.jpg Images to create a rollover image  Save your work and preview it in Internet Explorer to see if everything works
  • 8. Plenary...  You have just done something pretty complicated in creating a rollover image, but what do you think are the problems with using a rollover image on a webpage?  Update you HTML tag table to describe the following:  Onmouseover  Onmouseout
  • 9. Summary  In this lesson you have:  Added an image to an HTML document  Altered the size that an image is displayed in HTML  Used two images to create a rollover