In this code I linked some icons in to my html page. I want to print them in my html page. How can I do it?. I don't get any sufficient answer on my searches so apologies if this is a duplicate. in this link they have shown how to style icons loaded from internet using and tag,instead of internet i want to load from my computer using the same tags,can you help me?
<html>
<head>
<!-- <link rel="stylesheet" href="make.css">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">-->
<link rel="icon" type="image/png" href="icona.png" sizes="32x32" />
<link rel="icon" type="image/png" href="iconb.png" sizes="32x32" />
<link rel="icon" type="image/png" href="iconc.png" sizes="32x32" />
<link rel="icon" type="image/png" href="icond.png" sizes="32x32" />
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
</head>
<body>
</body>
</html>
for example here the <i>
tag is used to load an icon.
<a id="fa-flag" href="javascript:;" onClick="$C.setIcon()">
<i class="fa fa-flag"> </i>fa-flag
</a>
You cannot use link tag for displaying icons on your page. Its use is to load external stylesheets and setting icon of browser tab( favicon ). You can refer the following link for more details.
To display images you can do two things :-
1) By an img tag :-
<body>
<img src="icona.png" height="32" width="32" />
<img src="iconb.png" height="32" width="32" />
<img src="iconc.png" height="32" width="32" />
<img src="icond.png" height="32" width="32" />
<img src="favicon-16X16.png" height="16" width="16" />
<body>
2) By a div tag :-
html:-
<body>
<div class="image-icona" height="32" width="32"></div>
<body>
css:-
.image-icona{
width: 32px;
height: 32px;
background-image: url("../img/icona.png");
background-repeat: no-repeat;
background-size: contain;
}
IMG TAG
You need to use img
tag to display a picture in the webpage
LINK TAG
The tag is used for defining a link to an external document.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.