Introduction:
HTML Images are used to display pictures, graphics, and visual content on a web page.
The <img> tag is used to embed an image, specifying the source file and other attributes.
Key Attributes of the <img> Tag:
- src:Defines the source URL of the image.
- alt: Provides alternative text that describes the image (important for accessibility).
- width: Specifies the width of the image.
- height: Specifies the height of the image.
- title: Offers additional information about the image, usually displayed as a tooltip.
Insert Image
Image Maps
click on the Television to know about DESERT
Inserting an Gif file:
- You can also use gif file as a image like below one
- Use the width and height attributes to set the dimensions of the image.
- The values can be specified in pixels or as a percentage of the parent container.
HTML Block/Inline
Block-level Elements:
A block-level element always begins on a new line, and browsers add a margin (a space) before and after the element by default. A block-level element always
occupies the entire available width and extends as far to the left and right as it can.
HTML
CSS
Inline Elements:
- inline element does not start on a new line.
- An inline element only takes up as much width as necessary.
- This is a element inside a paragraph.
HTML
CSS
Javascript