Horje
How to create HTML width and height Attributes

The <img> tag should also contain the width and height attributes, which specify the width and height of the image (in pixels):


How is to look HTML width and height Attributes?

width="200" height="200"

Full Example of HTML width and height Attributes

Here we mean a size of Image 200px
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Width and Height Attributes</h2>

<p>The width and height attributes of the img tag, defines the width and height of the image:</p>

<img src="https://itupto.com/avatar.png" width="200" height="200">

</body>
</html>

Output should be:

Full Example of HTML width and height Attributes
Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_attributes_img





Related Articles
What is HTML Attributes HTML Attributes
How to create HTML href Attribute HTML Attributes
How to create HTML src Attribute HTML Attributes
How to create HTML width and height Attributes HTML Attributes
How to create HTML alt Attribute HTML Attributes
How to create HTML style Attribute HTML Attributes
How to create lang Attribute HTML Attributes
How to create HTML title Attribute HTML Attributes
How to create HTML Single or Double Quotes HTML Attributes
What is HTML Headings HTML Attributes
How to create HTML Headings HTML Attributes
What is Headings Are Important HTML Attributes
How to create HTML Bigger Headings HTML Attributes

Single Articles
How is to look HTML width and height Attributes?HTML Attributes
Full Example of HTML width and height AttributesHTML Attributes

Read Full:
HTML Attributes
Category:
Web Tutorial
Sub Category:
HTML Attributes
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
179



Share on: