
The width and height attributes always define the width and height of the image in pixels.
![]()
1- allign attribute < p >< img src=”images/bird.gif” alt=”Bird” width=”100” height=”100” align=”left” />

2- float attribute

Images often come with captions. HTML5 has introduced a new < figure > element to contain images and their caption so that the two are associated.
You can have more than one image inside the < figure > element as long as they all share the same caption.


The color property specifies the color of text.

The background-color property sets the background color of an element. The background of an element is the total size of the element, including padding and border (but not the margin).
Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.
For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255) and the others are set to 0.
To display black, set all color parameters to 0, like this: rgb(0, 0, 0).
To display white, set all color parameters to 255, like this: rgb(255, 255, 255).
A hexadecimal color is specified with: #RRGGBB.
RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.
RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity for a color.
An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

HSL stands for Hue, Saturation and Lightness.
An HSL color value is specified with: hsl(hue, saturation, lightness).

HSLA color values are an extension of HSL color values with an alpha channel - which specifies the opacity for a color.
An HSLA color value is specified with: hsla(hue, saturation, lightness, alpha), where the alpha parameter defines the opacity. The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

The CSS opacity property sets the opacity for the whole element (both background color and text will be opaque/transparent).
The opacity property value must be a number between 0.0 (fully transparent) and 1.0 (fully opaque).
ex : background-color:rgb(0,0,255);opacity:0.6;
Examples: Impact and Haettenschweiler


You can set content font size using the size attribute. The range of accepted values is from 1(smallest) to 7(largest). The default size of a font is 3.
You can also use font-size in pixels and percentage.






The text-shadow property has become commonly used despite lacking support in all browsers.
Syntax : text-shadow: -1px -1px #666666;


| format | uses | Compression |
|---|---|---|
| JPEG | Use JPEG format for all images that contain a natural scene or photograph where variation in colour and intensity is smooth. | lossy compression |
| PNG | Use PNG format for any image that needs transparency or for images with text & objects with sharp contrast edges like logos. | lossless compression |
| GIF | Use GIF format for images that contain animations. | lossless Compression |
is a process that removes some of the data from your image file, reducing the overall file size. This process is irreversible, meaning that the file information will be removed permanently.
won’t reduce image quality. That’s because lossless compression only removes additional, non-essential data automatically added by the device used to take the photo.