Computer Science, asked by suryansh12355, 2 months ago

What is the use of the height and width attributes in the (img) tag? How are their values specified​

Answers

Answered by zeus1001
2

Answer:

height and width attributes are used to specify size of the image to be displayed on the web page and are examples of inline styling

Before CSS became the standard way to control web page layout, it was common to include inline styling information. Under that paradigm, it was common to include sizing information along with the markup using the width and height attributes. This method will still work on most browsers today, but it is deprecated and should not be done.

Example:

<img src="/wp-content/uploads/flamingo.jpg" width="640" height="425">

Similar questions