英文:
Image not showing up on Html
问题
我完全不懂HTML,正在尝试使用记事本编写我的第一个东西。我已经添加了一个图片显示的部分,但它不起作用。我做错了什么?我已经编写了下面的代码,并将我遇到问题的部分用粗体标记出来。
我尝试让图片显示出来,但没有成功。
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<a href="https://www.youtube.com/watch?v=Vk4KK-gh0FM&pp=ygUObm9raWEgcmluZ3RvbmU%3D"> Iphone </a>
<img src="https://en.wikipedia.org/wiki/File:IPhone_14_Pro_vector_(blue).svg" width="500" height="600">
</body>
你可能需要检查图片链接是否正确。
英文:
I'm completely new to HTML and am trying to code my first thing using Notepad. I put the thing for an image to show up but it won't. what am I doing wrong? I've written the code below and I put the part I'm having trouble with in bold.
I tried to make the image show up but it didn't work.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<a href="https://www.youtube.com/watch?v=Vk4KK-gh0FM&pp=ygUObm9raWEgcmluZ3RvbmU%3D"> Iphone </a> **
<img src="https://en.wikipedia.org/wiki/File:IPhone_14_Pro_vector_(blue).svg" width="500" height="600">**
</body>
<!-- end snippet -->
答案1
得分: 2
这是实际的图像网址:https://upload.wikimedia.org/wikipedia/commons/3/36/IPhone_14_Pro_vector_%28blue%29.svg
英文:
The URL you're using is for a web page, not an image.
This is the actual image URL: https://upload.wikimedia.org/wikipedia/commons/3/36/IPhone_14_Pro_vector_%28blue%29.svg
答案2
得分: 0
你的URL正在将其定向到网页本身,而不是图像。
我认为应该将此URL放在src
上:
https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/IPhone_14_Pro_vector_%28blue%29.svg/295px-IPhone_14_Pro_vector_%28blue%29.svg.png
英文:
your URL is directing to the webpage itself, not the image.
I believe this should be the URL placed on the src
:
https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/IPhone_14_Pro_vector_%28blue%29.svg/295px-IPhone_14_Pro_vector_%28blue%29.svg.png
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论