The height and width attributes enable you to define the height and width respectively for inline - block elements.
Remember the width of inline - block elements is determine by their content and it is adjustable to whatever extent. The height
attributes enable us to achieve that.
<img height='120px' width='150px' src='happy_children.jpeg'/><br/><br/>
<img height='150px' width='100%' src='happy_children.jpeg'/>
Copy PRACTICE IT
- The HTML height and width attributes enable you to define or set a height and a width for an inline - block elements.
- You must not use both at the same time. That is, you may decide to set a height and leave the width and vice - versa. Finally, you can use both at same time.
- Heights and widths are usually set in pixels and percentages.