HTML Image Size

HTML image size is used to resize the image on the web page. The image size uses size elements with values to fix width. The image connects with the browser using sizes in html. It becomes responsive image size according to the web page screen. We can see the following essential points for the primary image sizes on the web page.

  • A screen size of 0 to 710 pixels is used with a small image size. We can use A 120-pixel layout.
  • A screen size of 711 px to 991 pixels is utilized with a tiny image. We can use A 193-pixel layout.
  • A screen size of 992 or more pixels is utilized with a tiny image. We can use A 278-pixel layout.

Syntax

The following syntax shows the image with the different sizes.

Examples

The following examples show the image with the different sizes. We can place the different default layouts with maximum and minimum width sizes.

Example 1:

The following example shows the essential image size in html. We can use default values for the primary image sizes.

Output:

The output image shows the basic image size.

HTML Image Size

Example 2:

The following example shows the basic image size in html. We can use different width sizes with the exact sizes for the image.

Output:

The output image shows the basic image size.

HTML Image Size

Example 3:

The following example shows the maximum width of the image size in html. We can use different width sizes with the exact sizes for the image.

Output:

The output image shows the max width image size.

HTML Image Size

Example 4:

The following example shows the minimum width of the image size in html. We can use different width sizes with the exact sizes for the image.

Output:

The output image shows the minimum width image size.

HTML Image Size

Example 5:

The following example shows the maximum and maximum width of the image size in html. We can use different width sizes with the exact sizes for the image.

Output:

The output image shows the maximum and minimum width image size.

HTML Image Size

Conclusion

The image size is essential for the HTML web page to display interactive and user-friendly functions. The developer uses HTML tags to set images according to function and make them eye-catching for the users.