Image
Absolute URL
The tag has two required attributes:
src - Specifies the path to the image
alt - Specifies an alternate text for the image
src="https://www.w3schools.com/images/img_girl.jpg"
Relative URL
src="../picture/html5logo.png"
height, width => The width and height attributes always define the width and height of the image in pixels.
Back to
Animated Images
HTML allows animated GIFs:Animated Images
HTML allows animated GIFs:
Image Floating
Use the CSS float property to let the image float to the right or to the left of a text
Common Image Formats
Here are the most common image file types, which are supported in all browsers (Chrome, Edge, Firefox, Safari, Opera):
- Animated Portable Network Graphics (.apng)
- Graphics Interchange Format (.gif)
- Microsoft Icon .ico, (.cur)
- Joint Photographic Expert Group image (.jpg, .jpeg, .jfif, .pjpeg, .pjp)
- Portable Network Graphics (.png)
- Scalable Vector Graphics (.svg)
Back to