Hi,
To display image in title bar and address bar , i have tried in all possible ways but image is not reflecting on the title bar and address bar. I have done as below:
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
I have created a .ico file and tried even that is not working.Please let me know where iam going wrong?

Thanks.

Recommended Answers

All 5 Replies

Member Avatar for LastMitch

image in title bar and address bar

I don't understand what you are doing?

You just want the icon appear on top right?

You should put it in between <header> tags

<link rel="shortcut icon" href="images/favicon.ico"">

:( i have done the same but the image is not reflecting in the title bar (top). I have done in the following way:
<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<link rel="shortcut icon" type="image/x-icon" href="/Images/favicon.ico" />
<title>Welcome</title>
<link rel="stylesheet" href="style/pageStyleSheet.css" type="text/css"/>
</head>

<body>

<div class="container">
....
Where iam going wrong.
Thanks for your time.

Member Avatar for LastMitch

You should be using HTML5:

<!DOCTYPE html>

and regarding about the icon appear try drjohn suggestion

From this:

<link rel="shortcut icon" type="image/x-icon" href="/Images/favicon.ico" />

to this:

<link rel="shortcut icon" type="image/x-icon" href="../Images/favicon.ico" />

Hi
Thanks for the time.
I have tried in all possible ways before only. I even tried by given the entire path of the favicon.ico file but image is not reflecting in the title bar. I even tried creating the favicon.ico file by following the steps given to create a favicon.ico file, but no luck.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.