SlideShare a Scribd company logo
2
Most read
4
Most read
14
Most read
HTML Images Syntax
BY.: TR. MJ FERNANDEZ
JOY IN LEARNING SCHOOL INC.
HTML Images Syntax
 In HTML, images are defined with the <img> tag.
 The <img> tag is empty, it contains attributes only, and
does not have a closing tag.
 The src attribute specifies the URL (web address) of the
image:
The alt Attribute
 The alt attribute provides an alternate text for an image, if
the user for some reason cannot view it (because of slow
connection, an error in the src attribute, or if the user uses a
screen reader).
 The value of the alt attribute should describe the image:
The alt Attribute If a browser cannot find an image, it will
display the value of the alt attribute:
The alt Attribute If a browser cannot find an image, it will
display the value of the alt attribute:
Image Size - Width and Height
Image Size - Width and Height
Alternatively, you can use
the width and height attribute
s:
Alternatively, you can use
the width and height attributes:
The width and height attributes always
defines the width and height of the image in
pixels.
Width and Height, or Style?
The width, height, and style attributes are valid in HTML.
However, we suggest using the style attribute. It prevents styles sheets from changing the
size of images:
Width and Height, or Style?
The width, height, and style attributes are valid in HTML.
However, we suggest using the style attribute. It prevents styles sheets from changing the
size of images:
Images in Another Folder
If not specified, the browser expects to find the image in the same folder as the web page.
However, it is common to store images in a sub-folder. You must then include the folder
name in the src attribute:
Images on Another Server
Some web sites store their images on image servers.
Actually, you can access images from any web address in the world:
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:
Image Floating
Use the CSS float property to let the image float to the right or to the left of a
text:
Image Floating
Use the CSS float property to let the image float to the right or to the left of a
text:
Image Maps
The <map> tag defines an image-map. An image-map is an image with clickable areas.
In the image below, click on the computer, the phone, or the cup of coffee:
The name attribute of
the <map> tag is
associated with
the <img>'s usemap
attribute and creates a
relationship between the
image and the map.
The <map> element
contains a number
of <area> tags, that
define the clickable
areas in the image-map.
Image Maps
Background Image
To add a background image on an HTML element, use the CSS property background-image:
The HTML <picture> Element
HTML5 introduced the <picture> element to add more flexibility when specifying
image resources.
The <picture> element contains a number of <source> elements, each referring
to different image sources. This way the browser can choose the image that
best fits the current view and/or device.
Each <source> element have attributes describing when their image is the most
suitable.
The browser will use the first <source> element with matching attribute values,
and ignore any following <source> elements.
The HTML <picture> Element
Html images syntax
Chapter Summary
•Use the HTML <img> element to define an image
•Use the HTML src attribute to define the URL of the image
•Use the HTML alt attribute to define an alternate text for an image, if it cannot be
displayed
•Use the HTML width and height attributes to define the size of the image
•Use the CSS width and height properties to define the size of the image
(alternatively)
•Use the CSS float property to let the image float
•Use the HTML <map> element to define an image-map
•Use the HTML <area> element to define the clickable areas in the image-map
•Use the HTML <img>'s element usemap attribute to point to an image-map
•Use the HTML <picture> element to show different images for different devices
REFERENCE:
HTML IMAGES
https://www.w3schools.com/html/html_images.asp

More Related Content

PPTX
HTML5 - Insert images and Apply page backgrounds
PDF
Intro to HTML and CSS basics
PPTX
PPTX
Images and Tables in HTML
PDF
Game Development With Python and Pygame
PPTX
Html links
PPTX
Introduction to poetry
PPTX
The Indian Ocean Tsunami, 2004
HTML5 - Insert images and Apply page backgrounds
Intro to HTML and CSS basics
Images and Tables in HTML
Game Development With Python and Pygame
Html links
Introduction to poetry
The Indian Ocean Tsunami, 2004

What's hot (20)

PPTX
Html images
PPTX
css.ppt
PPTX
PPT
Hyperlinks in HTML
PPTX
HTML Forms
PPT
cascading style sheet ppt
PPTX
Lecture 2 introduction to html
PPT
PDF
Introduction to HTML
PPT
Html Slide Part-1
PPTX
Css position
PDF
Html frames
PPTX
HTML5 audio & video
PPTX
PPTX
html-table
PPTX
Html tags
PPT
Introduction to CSS
PPTX
PPTX
Links in Html
Html images
css.ppt
Hyperlinks in HTML
HTML Forms
cascading style sheet ppt
Lecture 2 introduction to html
Introduction to HTML
Html Slide Part-1
Css position
Html frames
HTML5 audio & video
html-table
Html tags
Introduction to CSS
Links in Html
Ad

Similar to Html images syntax (20)

PPTX
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
PPTX
HTML Images
PPT
2.1 adding images
PPTX
Imagetag
PPTX
Html images and html backgrounds
PPT
Html 5 and CSS - Image Element
PPTX
PDF
Web Development 3 (HTML & CSS)
PPTX
PPTX
HTML Attributes.pptx
PPT
HTML_Images.ppt
PPTX
HTML Attributes.pptx
PPTX
CAP 756 UNIT 1.pptx
PPT
N5 Computing Science HTML
PPTX
HTML (part ii).pptx
PPTX
HTML Images & Hyperlinks Presentation ..
PPT
Working with Images
PPTX
MONTEZA-html-in[opk[';ldividual-report.pptx
PPTX
Web Designing Lecture 2 in Software.pptx
PPTX
HTML Link - Image - Comments
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
HTML Images
2.1 adding images
Imagetag
Html images and html backgrounds
Html 5 and CSS - Image Element
Web Development 3 (HTML & CSS)
HTML Attributes.pptx
HTML_Images.ppt
HTML Attributes.pptx
CAP 756 UNIT 1.pptx
N5 Computing Science HTML
HTML (part ii).pptx
HTML Images & Hyperlinks Presentation ..
Working with Images
MONTEZA-html-in[opk[';ldividual-report.pptx
Web Designing Lecture 2 in Software.pptx
HTML Link - Image - Comments
Ad

More from JayjZens (20)

PPTX
LESSON 9 (WEEK 10) COLLABORATIVE ICT DEVELOPMENT.pptx
PPTX
LESSON 8 (WEEK 9) BASIC WEB PAGE CREATION.pptx
PPTX
LESSON 7 (WEEK 8) ONLINE PLATFORMS FOR ICT CONTENT DEVELOPMENT.pptx
PPTX
LESSON 4 (WEEK 5) PRODUCTIVITY TOOL (MS EXCEL).pptx
PPTX
LESSON 1 (WEEK 1) INFORMATION AND COMMUNICATION TECHNOLOGY_2.pptx
PDF
ETECH_Chapter 1_Module_2022-2023.pdf
PPTX
Science 7 lesson 1.1
PPTX
Quilling famtime
PPTX
Rebekah women of the bible
PPTX
1. intro ict
PPTX
Evaluating internet resources
PPTX
Web browser &amp; search engine
PPTX
Introbotics
PPTX
Creating &amp; organizing bookmark for website
PPTX
Advantages and disadvantages of using online tools
PPT
1. introduction to html5
PPTX
Styling of css
PPTX
Html table
PPTX
Creating you first web page!
PPTX
Roborobo 3 parts
LESSON 9 (WEEK 10) COLLABORATIVE ICT DEVELOPMENT.pptx
LESSON 8 (WEEK 9) BASIC WEB PAGE CREATION.pptx
LESSON 7 (WEEK 8) ONLINE PLATFORMS FOR ICT CONTENT DEVELOPMENT.pptx
LESSON 4 (WEEK 5) PRODUCTIVITY TOOL (MS EXCEL).pptx
LESSON 1 (WEEK 1) INFORMATION AND COMMUNICATION TECHNOLOGY_2.pptx
ETECH_Chapter 1_Module_2022-2023.pdf
Science 7 lesson 1.1
Quilling famtime
Rebekah women of the bible
1. intro ict
Evaluating internet resources
Web browser &amp; search engine
Introbotics
Creating &amp; organizing bookmark for website
Advantages and disadvantages of using online tools
1. introduction to html5
Styling of css
Html table
Creating you first web page!
Roborobo 3 parts

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Cost to Outsource Software Development in 2025
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Odoo Companies in India – Driving Business Transformation.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
CHAPTER 2 - PM Management and IT Context
Reimagine Home Health with the Power of Agentic AI​
Computer Software and OS of computer science of grade 11.pptx
Cost to Outsource Software Development in 2025
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
wealthsignaloriginal-com-DS-text-... (1).pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo POS Development Services by CandidRoot Solutions
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Wondershare Filmora 15 Crack With Activation Key [2025
Softaken Excel to vCard Converter Software.pdf
Designing Intelligence for the Shop Floor.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Odoo Companies in India – Driving Business Transformation.pdf

Html images syntax

  • 1. HTML Images Syntax BY.: TR. MJ FERNANDEZ JOY IN LEARNING SCHOOL INC.
  • 2. HTML Images Syntax  In HTML, images are defined with the <img> tag.  The <img> tag is empty, it contains attributes only, and does not have a closing tag.  The src attribute specifies the URL (web address) of the image:
  • 3. The alt Attribute  The alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).  The value of the alt attribute should describe the image:
  • 4. The alt Attribute If a browser cannot find an image, it will display the value of the alt attribute:
  • 5. The alt Attribute If a browser cannot find an image, it will display the value of the alt attribute:
  • 6. Image Size - Width and Height
  • 7. Image Size - Width and Height Alternatively, you can use the width and height attribute s:
  • 8. Alternatively, you can use the width and height attributes: The width and height attributes always defines the width and height of the image in pixels.
  • 9. Width and Height, or Style? The width, height, and style attributes are valid in HTML. However, we suggest using the style attribute. It prevents styles sheets from changing the size of images:
  • 10. Width and Height, or Style? The width, height, and style attributes are valid in HTML. However, we suggest using the style attribute. It prevents styles sheets from changing the size of images:
  • 11. Images in Another Folder If not specified, the browser expects to find the image in the same folder as the web page. However, it is common to store images in a sub-folder. You must then include the folder name in the src attribute:
  • 12. Images on Another Server Some web sites store their images on image servers. Actually, you can access images from any web address in the world:
  • 13. Animated Images HTML allows animated GIFs:
  • 14. Image as a Link To use an image as a link, put the <img> tag inside the <a> tag:
  • 15. Image Floating Use the CSS float property to let the image float to the right or to the left of a text:
  • 16. Image Floating Use the CSS float property to let the image float to the right or to the left of a text:
  • 17. Image Maps The <map> tag defines an image-map. An image-map is an image with clickable areas. In the image below, click on the computer, the phone, or the cup of coffee: The name attribute of the <map> tag is associated with the <img>'s usemap attribute and creates a relationship between the image and the map. The <map> element contains a number of <area> tags, that define the clickable areas in the image-map.
  • 19. Background Image To add a background image on an HTML element, use the CSS property background-image:
  • 20. The HTML <picture> Element HTML5 introduced the <picture> element to add more flexibility when specifying image resources. The <picture> element contains a number of <source> elements, each referring to different image sources. This way the browser can choose the image that best fits the current view and/or device. Each <source> element have attributes describing when their image is the most suitable. The browser will use the first <source> element with matching attribute values, and ignore any following <source> elements.
  • 23. Chapter Summary •Use the HTML <img> element to define an image •Use the HTML src attribute to define the URL of the image •Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed •Use the HTML width and height attributes to define the size of the image •Use the CSS width and height properties to define the size of the image (alternatively) •Use the CSS float property to let the image float •Use the HTML <map> element to define an image-map •Use the HTML <area> element to define the clickable areas in the image-map •Use the HTML <img>'s element usemap attribute to point to an image-map •Use the HTML <picture> element to show different images for different devices