SlideShare a Scribd company logo
Java Script: 
Changing Images on hover 
Learning by examples: 
by: Engr. Esmeraldo T. Guimbarda Jr.
Activity: 
1. Open 
Notepad++. 
Click on Start > 
All Programs > 
Notepad++ 
folder > 
Notepad++.
2. Create a new 
HTML file by 
clicking File > 
New, or 
pressing Ctrl+N 
on your 
keyboard.
3. Save the file as 
“animate.html”. 
To save the file, go to 
File > Save As. Type 
“animate.html” 
in the File name box. 
Select Hypertext Markup 
Language file 
in the Save as type 
selection menu. Save 
the file in your desktop.
4. Type the basic 
skeleton code of an 
HTML document.
5. Define the title as “Animate image on hover with Javascript”.
6. Add the style tag <style> with type as text/css at the head tag 
<head> section below title tag <title> and create two(2) ID’s named 
smiley & poem.
7. Inside #smiley set padding to 0, both margin to auto,& text-align to 
center.
8. Inside #poem set width to 50%, both margin to auto, text-align to 
center, background color to red using RGB values and text color to yellow 
using hexadecimal values.
9. Inside body tag <body>, create a division tag <div> with division 
id as smiley
10. Inside division <div> id smiley, assign smile.png as your image.
11. Inside image tag <img>, assign bleh.png as your image when 
you hover your mouse over image smile.png.
12. Inside image tag <img>, assign smile.png again as your image 
when you hover out your mouse over image.
13. below the division(smiley). Create another division with division id 
as poem
14. Inside division <div> id poem, create a paragraph tag <p>. 
Inside the paragraph tag <p>type in the poem titled tickle as shown 
below
15. Save the file by clicking File > Save or pressing Ctrl + S on your 
keyboard.
16. Open the HTML file to your browser by clicking Run > Lunch in Chrome or 
Lunch in Firefox on your Notepad++
OUTPUT:

More Related Content

PDF
TM 2nd Quarter - 1st meeting(html backgrounds)
PPTX
Introduction to html | Rustcode
PDF
How to update HTML files
DOCX
Html codes
PPT
Share google documents with others
PPT
PPTX
Heading Section in HTML - R.D.Sivakumar
TM 2nd Quarter - 1st meeting(html backgrounds)
Introduction to html | Rustcode
How to update HTML files
Html codes
Share google documents with others
Heading Section in HTML - R.D.Sivakumar

What's hot (6)

PPTX
Hyper Text Marup Language
PPTX
4 html tags
PPTX
3 first code_in_html
PPTX
Learn html in 30mins
PPTX
Google chrome developer and tags
PDF
Schematron For Non-XML Languages
Hyper Text Marup Language
4 html tags
3 first code_in_html
Learn html in 30mins
Google chrome developer and tags
Schematron For Non-XML Languages
Ad

Viewers also liked (13)

PDF
Tm 1st quarter - 2nd meeting
PDF
1st qtr 3rd meeting-travel
PDF
1st quarter 3rd meeting(poet)
PDF
Tm 1st quarter - 1st meeting
PDF
Crif acacias flipped proyecto final
PPTX
Locations
PPTX
Maacc meeting jan 17_13_final
PPTX
Locations updated
PDF
4th quarter 18 php & my sql change password page
PPTX
مهارات البحث الاقتصادي للصحفيين
PDF
TM 2nd qtr-3ndmeeting(java script-functions)
PPT
Basic kinematic concepts
PPTX
الأوضاع الاقتصادية في أرقام
Tm 1st quarter - 2nd meeting
1st qtr 3rd meeting-travel
1st quarter 3rd meeting(poet)
Tm 1st quarter - 1st meeting
Crif acacias flipped proyecto final
Locations
Maacc meeting jan 17_13_final
Locations updated
4th quarter 18 php & my sql change password page
مهارات البحث الاقتصادي للصحفيين
TM 2nd qtr-3ndmeeting(java script-functions)
Basic kinematic concepts
الأوضاع الاقتصادية في أرقام
Ad

Similar to TM 2nd qtr-2ndmeeting(java script-animations) (8)

PPTX
Geekspeak: Javascript
DOC
Basic html training national
PPT
Web Design 101
PPTX
Animation in the web
PPT
Session7 Adding pictures to Website and Canva.ppt
DOCX
HTML Lab ProjectTo create a simple web page you will need .docx
PPTX
How to Create a Simple Webpage Using Notepad.pptx
PPTX
Basic Html for beginners.
Geekspeak: Javascript
Basic html training national
Web Design 101
Animation in the web
Session7 Adding pictures to Website and Canva.ppt
HTML Lab ProjectTo create a simple web page you will need .docx
How to Create a Simple Webpage Using Notepad.pptx
Basic Html for beginners.

More from Esmeraldo Jr Guimbarda (19)

PDF
2nd quarter 1st meeting(autofill)
PDF
2ndQuarter2ndMeeting(formatting number)
PDF
Debugging the mastery test
PDF
TM 1st quarter - 4th meeting
PDF
1st quarter 5th meeting- spreadsheet (formula- mdas)
PDF
1st quarter 5th meeting
PDF
1st qtr 4th meeting-travel
PDF
1st qtr 5th meeting-travel
PDF
1st quarter 4th meeting- spreadsheet
PDF
1st quarter 3rd meeting- spreadsheet
PDF
1st quarter 2nd meeting(poet)
PDF
1st quarter 1st meeting(poet)
PDF
1st qtr 2nd metting- travel
PDF
Tm 1st quarter - 3rd meeting
PDF
1st quarter 2nd meeting- spreadsheet
PDF
1st quarter 1st meeting- spreadsheet
PDF
1stQtr-1stMeeting-travel
PDF
4th quarter 18 php & my sql change password page
PDF
4th quarter 17 php & my sql registration page
2nd quarter 1st meeting(autofill)
2ndQuarter2ndMeeting(formatting number)
Debugging the mastery test
TM 1st quarter - 4th meeting
1st quarter 5th meeting- spreadsheet (formula- mdas)
1st quarter 5th meeting
1st qtr 4th meeting-travel
1st qtr 5th meeting-travel
1st quarter 4th meeting- spreadsheet
1st quarter 3rd meeting- spreadsheet
1st quarter 2nd meeting(poet)
1st quarter 1st meeting(poet)
1st qtr 2nd metting- travel
Tm 1st quarter - 3rd meeting
1st quarter 2nd meeting- spreadsheet
1st quarter 1st meeting- spreadsheet
1stQtr-1stMeeting-travel
4th quarter 18 php & my sql change password page
4th quarter 17 php & my sql registration page

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Anesthesia in Laparoscopic Surgery in India
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Computing-Curriculum for Schools in Ghana
A systematic review of self-coping strategies used by university students to ...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Supply Chain Operations Speaking Notes -ICLT Program
VCE English Exam - Section C Student Revision Booklet
O5-L3 Freight Transport Ops (International) V1.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pharma ospi slides which help in ospi learning

TM 2nd qtr-2ndmeeting(java script-animations)

  • 1. Java Script: Changing Images on hover Learning by examples: by: Engr. Esmeraldo T. Guimbarda Jr.
  • 2. Activity: 1. Open Notepad++. Click on Start > All Programs > Notepad++ folder > Notepad++.
  • 3. 2. Create a new HTML file by clicking File > New, or pressing Ctrl+N on your keyboard.
  • 4. 3. Save the file as “animate.html”. To save the file, go to File > Save As. Type “animate.html” in the File name box. Select Hypertext Markup Language file in the Save as type selection menu. Save the file in your desktop.
  • 5. 4. Type the basic skeleton code of an HTML document.
  • 6. 5. Define the title as “Animate image on hover with Javascript”.
  • 7. 6. Add the style tag <style> with type as text/css at the head tag <head> section below title tag <title> and create two(2) ID’s named smiley & poem.
  • 8. 7. Inside #smiley set padding to 0, both margin to auto,& text-align to center.
  • 9. 8. Inside #poem set width to 50%, both margin to auto, text-align to center, background color to red using RGB values and text color to yellow using hexadecimal values.
  • 10. 9. Inside body tag <body>, create a division tag <div> with division id as smiley
  • 11. 10. Inside division <div> id smiley, assign smile.png as your image.
  • 12. 11. Inside image tag <img>, assign bleh.png as your image when you hover your mouse over image smile.png.
  • 13. 12. Inside image tag <img>, assign smile.png again as your image when you hover out your mouse over image.
  • 14. 13. below the division(smiley). Create another division with division id as poem
  • 15. 14. Inside division <div> id poem, create a paragraph tag <p>. Inside the paragraph tag <p>type in the poem titled tickle as shown below
  • 16. 15. Save the file by clicking File > Save or pressing Ctrl + S on your keyboard.
  • 17. 16. Open the HTML file to your browser by clicking Run > Lunch in Chrome or Lunch in Firefox on your Notepad++