1毯侦、背景圖片
<html>
<body background="圖片">
<h3>圖像背景</h3>
<p>gif 和 jpg 文件均可用作 HTML 背景烹卒。</p>
<p>如果圖像小于頁(yè)面赂乐,圖像會(huì)進(jìn)行重復(fù)痴柔。</p>
</body>
</html>
2济榨、排列圖片-與文本的對(duì)齊方式
<html>
<body>
<h2>未設(shè)置對(duì)齊方式的圖像:</h2>
<p>圖像 <img src ="圖片"> 在文本中</p>
<h2>已設(shè)置對(duì)齊方式的圖像:</h2>
<p>圖像  在文本中</p>
<p>圖像  在文本中</p>
<p>圖像  在文本中</p>
<p>請(qǐng)注意寄纵,bottom 對(duì)齊方式是默認(rèn)的對(duì)齊方式绊谭。</p>
</body>
</html>
3盾似、調(diào)整圖像尺寸
<img src="" width="50" height="50">
<p>通過(guò)改變 img 標(biāo)簽的 "height" 和 "width" 屬性的值矛双,您可以放大或縮小圖像渊抽。</p>
4、為圖片顯示替換文本
<p>如果無(wú)法顯示圖像议忽,將顯示 "alt" 屬性中的文本:</p>
<img src="" alt="向左轉(zhuǎn)" />
5懒闷、制作圖像鏈接
<a href="/example/html/lastpage.html">
<img border="0" src="" />
</a>
6、創(chuàng)建圖像映射
#本例顯示如何創(chuàng)建帶有可供點(diǎn)擊區(qū)域的圖像地圖栈幸。
<html>
<body>
<p>請(qǐng)點(diǎn)擊圖像上的星球愤估,把它們放大。</p>
<img
src=""
border="0" usemap="#planetmap"
alt="Planets" />
<map name="planetmap" id="planetmap">
<area
shape="circle"
coords="180,139,14"
href ="/example/html/venus.html"
target ="_blank"
alt="Venus" />
<area
shape="circle"
coords="129,161,10"
href ="/example/html/mercur.html"
target ="_blank"
alt="Mercury" />
<area
shape="rect"
coords="0,0,110,260"
href ="/example/html/sun.html"
target ="_blank"
alt="Sun" />
</map>
<p><b>注釋:</b>img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據(jù)瀏覽器)速址,所以我們同時(shí)向 map 元素添加了 "id" 和 "name" 屬性玩焰。</p>
</body>
</html>
7、把圖像轉(zhuǎn)換為圖像映射
<a href="/example/html/html_ismap.html">
<img src="" ismap />
</a>