Reputation: 14751
i write this code in a html page but it doesn't show the image what is problem?
<html>
<head>
<title>register page</title>
<body>
</head>
<table align="center">
<tr>
<td>
<img src="C:/xampp/htdocs/me/images/register.jpg" width="600" height="395">
</td>
</tr>
</table>
</body>
</html>
Upvotes: 0
Views: 3418
Reputation: 3620
did you check if is it the image available on that folder?
it would be nice if you are using relative path:
Relative Path URLs
Relative paths change depending upon what page the links are located on. There are several rules to creating a link using the relative path:
links in the same directory as the page have no path information listed filename sub-directories are listed without any preceding slashes weekly/filename links up one directory are listed as ../filename
How to determine the relative path:
Write the link using the rules listed above:
<img src="images/register.jpg" />
Upvotes: -1
Reputation: 21368
If you're running it served from the actual server, the image src
is invalid. It needs to be relative to your application root. In other words, if you application root is C:/xampp/htdocs/me
, then your image tag should actually be <img src="/images/register.jpg" width="600" height="395">
Upvotes: 5
Reputation: 85046
You have provided a full file path, not a relative path or URL.
If your website lives in htdocs
, try changing the path to /me/images/register.jpg
Upvotes: 5