How to set the size of the linked resource in HTML5 ?
Approach: We set the sizes of the linked resource by using the sizes attributes in <link> tag in HTML. It is used to specify the sizes of the icon for visual media, and it only works when set to rel=”icon”. It is a read-only property.
<link sizes="HeightxWidth | any">
Possible values to set the size of the linked resource are as follows:
- HeightxWidth It is used to specify one or more sizes of a linked icon. The value of the height and the width are separated by an “x” or “X”.
- any: It specifies that the icon is scalable (like an SVG or PNG image).
Output: Notice the image icon in the top left corner of the web page.