Module 7 HTML Images
Module 7 HTML Images
Department of Education
Region III
Division of City Schools
OLONGAPO CITY NATIONAL HIGH SCHOOL
Olongapo City
Quarter 4: Computer Science 1 for Grade 7 ICT and STE Program (Week 5)
Module 11: HTML Images
Learning Objective: To insert and format HTML images.
Images can improve the design and the appearance of a web page.
Syntax: Output:
The width and height attributes always define the width and height of the image in pixels.
Note: Always specify the width and height of an image. If width and height are not specified, the web page might flicker while the image
loads.
Width and Height, or Style?
The width, height, and style attributes are all valid in HTML.
However, we suggest using the style attribute. It prevents styles sheets from changing the size of images:
Animated Images
HTML allows animated GIFs:
Image as a Link
To use an image as a link, put the <img> tag inside the <a> tag:
3. ___________ Use this HTML attribute to define an alternate text for an image, if it cannot be displayed.
4. ___________ Use this HTML attribute to define the URL of the image.
5. ___________ Use this HTML attributes to define the size of the image.