HTML
HTML Introduction
HTML Element
HTML Attributes
HTML Heading
HTML Paragraph
HTML Style
HTML Format
HTML Color
HTML Link
HTML Image
HTML Table
HTML List
HTML Symbols
HTML Emojis
HTML Forms
HTML Images
Images can improve the design and the appearance of a web page.
HTML Images Syntax
The HTML
tag is used to embed an image in a web page.
Images are not technically inserted into a web page; images are linked to web pages.
The <img> tag is empty, it contains attributes only, and does not have a closing tag.
The <img> tag has two required attributes:
Image Size - Width and Height
You can use the style attribute to specify the width and height of an image.
HTML Background Images
To add a background image on an HTML element, use the HTML style attribute and the CSS background-image property:



Example
<img src="css.jpg" alt="Italian Trulli">
- src - Specifies the path to the image
- alt - Specifies an alternate text for the image