標籤:
一、連結
1.新頁面開啟連結
<a href="http://www.w3school.com.cn/" target="_blank">Visit W3School!</a>
2.本頁面,name為"C4"處開啟連結
<p><a href="#C4">查看 Chapter 4。</a></p><h2>Chapter 1</h2><p>This chapter explains ba bla bla</p><h2><a name="C4">Chapter 4</a></h2><p>This chapter explains ba bla bla</p>
3.跳出架構
<a href="/index.html"target="_top">請點擊這裡!</a>
4.發送郵件連結
<a href="mailto:[email protected]?subject=Hello%20again">發送郵件</a>
5.複雜的郵件連結
<a href="mailto:[email protected][email protected]&[email protected]&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">發送郵件!</a>
二、映像
1.圖片背景
<body background="/i/eg_background.jpg"><h3>映像背景</h3><p>gif 和 jpg 檔案均可用作 HTML 背景。</p><p>如果映像小於頁面,映像會進行重複。</p></body>
2.圖片位置
文本中位置:bottom(預設)、middle、top
段落中浮動:left、right
<p>映像 <img src="/i/eg_cute.gif" align="bottom"> 在文本中</p>
3.圖片替換文本
<img src="/i/eg_goleft123.gif" alt="向左轉" />
4.圖片連結
<a href="/example/html/lastpage.html"> <img border="0" src="/i/eg_buttonnext.gif" /></a>
5.建立影像地圖
img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據瀏覽器),
所以我們同時向 map 元素添加了 "id" 和 "name" 屬性
map該name元素,擷取圖片圓形地區,添加連結。
<imgsrc="/i/eg_planets.jpg"border="0" usemap="#planetmap"alt="Planets" /><map name="planetmap" id="planetmap"><areashape="circle"coords="180,139,14"href ="/example/html/venus.html"target ="_blank"alt="Venus" /><areashape="circle"coords="129,161,10"href ="/example/html/mercur.html"target ="_blank"alt="Mercury" /></map>
6.把映像轉換為影像地圖
<p>請把滑鼠移動到映像上,看一下狀態列的座標如何變化。</p><a href="/example/html/html_ismap.html"><img src="/i/eg_planets.jpg" ismap /></a>
映像標籤:
| <img> |
定義映像。 |
| <map> |
定義映像地圖。 |
| <area> |
定義映像地圖中的可點擊地區 |
HTML——連結&映像