HTML CSS examples for HTML Tag:link
The sizes attribute specifies the sizes of icons for visual media.
This attribute is only used if rel="icon".
Value | Description |
---|---|
HeightxWidth | Specifies one or more sizes for the linked icon. |
any | Specifies that the icon is scalable (like an SVG image) |
Examples:
The following code shows how to set Icon with specified size:
<!DOCTYPE html> <html> <head> <link rel="icon" href="https://www.java2s.com/style/demo/Opera.png" type="image/gif" sizes="16x16"> </head><!--from w ww.j a v a 2s. c om--> <body> <h2>Hello world!</h2> <p>Open this page in a <a href="https://www.java2s.com/style/demo/Opera.png" target="_blank">new window</a> to see the favicon.</p> </body> </html>