在HTML中img的问题

Mah*_*ine 0 html image

我在html页面中编写此代码,但它没有显示图像有什么问题?

<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>
Run Code Online (Sandbox Code Playgroud)

Abe*_*ler 5

您提供了完整的文件路径,而不是相对路径或URL.

如果您的网站存在htdocs,请尝试更改路径/me/images/register.jpg


Dem*_*cht 5

如果您从实际服务器运行它,则图像src无效.它需要与您的应用程序根相对.换句话说,如果您的应用程序是root C:/xampp/htdocs/me,那么您的图像标记应该是<img src="/images/register.jpg" width="600" height="395">