Image Size - Width and Height: Concept Note 3 Using HTML Images
Image Size - Width and Height: Concept Note 3 Using HTML Images
Image Size - Width and Height: Concept Note 3 Using HTML Images
Alternatively, you can use the width and height attributes. The values are specified in pixels by
default, no need to add px after the value.
Example:
<img src="html5.gif" alt="HTML5" width="128" height="128">
Both the options are available in HTML5.
Example:
<img src="/images/image.jpg" alt="sample text">
Aligning images
For the image to align middle, top, or bottom use the CSS property vertical-align.
For the image to align left or right use the CSS property float.
Image Floating
Use the CSS float property to let the image float to the right or to the left of a text.