我想让我的图像显示在网页上

时间:2013-09-21 09:50:26

标签: html image

我需要做些什么才能让我的图片显示在我的网页上。我想把图像放在我的html文档中。该框显示但不显示图像。这个代码<img scr="smile.jpg" width="120" height="90"/>我还没有将网页放在互联网上。

<HTML>
<HEAD> 
    <TITLE> Tay first Web page </TITLE>
</HEAD>
<BODY>
<H1 ALIGN="center"> Why do I want to learn to code? </H1>
    <P> I want to learn to code because it will help me develop the skills I need in web development and game development. My goal is to learn how to code in many different languages. It is amazing to me to be able to create something from scratch and making it into your vision.</P>
<H2 ALIGN="center"> Why is coding fun? </H2>
    <P> Computer coding is <STRONG> wonderful.</STRONG> You get to make a web page with whatever info you want and add so many things to it to make it mind blowing.There are colours, images, flash, and you can even make a video game if you wanted too. The possibilities are endless and mind blowing.</P>
<H3 ALIGN="center"> How can coding be important in the real world? </H3>
    <P> <EM>Technology</EM> is everywhere and is constantly changing. <MARK>Computers</MARK> are so intertwined in our lives. People view web pages all the time and are looking at code everyday. Being able to code can get you a job if you are efficient with different languages.
    <P><STRONG>These are the best consoles ever!!!!</STRONG></P>
<UL>
    <LI>N64</LI>
    <LI>SEGA GENESIS</LI>
    <LI>XBOX</LI>
    <LI>XBOX 360</LI>
</UL>
<TABLE BORDER="1">
<TR><TD>First</TD></TR>
<TR><TD>Second</TD></TR>
<TR><TD>Third</TD></TR>
</TABLE>
<IMG SRC="smile.jpg" WIDTH="120" HEIGHT="90"/>

</BODY>
</HTML>

5 个答案:

答案 0 :(得分:6)

你必须正确拼写src(SouRCe)。你有两个字母颠倒了。

如果您使用a validator执行了一些基本的自动质量检查,则可以使用此功能。

答案 1 :(得分:0)

你的img标签错了,它应该是

<img src="smile.jpg" width="120" height="90"/>

答案 2 :(得分:0)

检查以下内容: 您的图片可能可能位于文件以外的其他文件夹中吗? 页面上是否有其他 div或元素可能是“在顶部”的图像? 您的布局可以“屏幕外”吗? 是否有代码可以设置可见性:无? 你能拼错图像的文件名吗? 您是否确定在尝试再次加载时强制刷新浏览器窗口?

请给我们整个代码;最好是作为JS小提琴。

答案 3 :(得分:0)

如果您希望在Linux服务器上找到它,则文件名区分大小写。如果你设置并测试它并发现它在Windows系统上运行良好,你可能没有注意到smile.JPG和SMILE.jpg以及Smile.jpg都将被视为与它们是同一个东西smile.jpg。在Linux主机上,如果你调用了smile.jpg并且它被存储为smile.JPG(例如),你将得到你正在观察的结果。

答案 4 :(得分:-1)

宽度和高度属性应具有单位。你想要它们像素? 试试这个:

<img src="smile.jpg" width="120px" height="90px"/>
相关问题