1. 程式人生 > >HTML標籤筆記1

HTML標籤筆記1

<!DOCTYPE>告訴瀏覽器該用那個html版本進行編寫;
<a></a> 超連結標籤。屬性href="url",當href="#"時表示跳轉到頁面頂部。可連結到同一頁面的不同位置,連結到不同頁面,使用圖片做連結跳轉,target=_blank 在新視窗開啟連結頁面。target=_top跳出原有的框架。href="mailto:......."做郵件連結,但郵件地址中的空格必須用20%代替。
<h3>超連結a練習</h3>
      <a href="https://mp.csdn.net/mdeditor/81457938"
target="_top">
學習計劃</a> <div class="img_target"> <a href="https://mp.csdn.net/mdeditor/81457938" > <img src="../img/1.gif"/> <!--用圖片做連結跳轉--> </a> </div> <div> <a href="mailto:[email protected]
?subject=Hello20%again"
>
郵件連結</a> <!--使用a做郵件連結 20%是地址的空格符--> </div>
<abbr></abbr> 指示簡稱或縮寫
<address></address> 文件或文章的作者聯絡資訊
<area> 巢狀在<map></map>中,定義影象對映的區域(帶有可點選影象的區域);
area必須有alt屬性,alt屬性定義了區域的替換文字。href屬性定義了點選影象中的區域後跳轉到的頁面;area中有coords(區域的座標)屬性,coords必須和shape屬性相結合使用,shape="circle" coords="x,y,z"表示圓形,    shape="polygon" coords="x1,y1,x2,y2,x3,y3,..."表示多邊形,shape="rectangle",coords="x1,y1,x2,y2"表示矩形;area 在 表示點選影象區域時,影象img中必須有usemap屬性與map屬性中的id或name相對應。
<!--area屬性-->
<img src="../img/eg_planets.jpg" border="0" usemap="#planetmap" alt="Planets" />

<map name="planetmap" id="planetmap">
    <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />
    <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />
    <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" />
</map>
<article><article/> 文章,一段獨立的內容;
<aside><aside/> 內容之外的內容,文章的側欄;
<audio></audio> 音訊檔案,屬性src="url檔案地址" loop="loop"迴圈播放,controls="controls"向用戶顯示播放控制元件;
<!--audio音訊屬性-->
<audio src="../img/horse.ogg" controls="controls" autoplay="autoplay" loop="loop"></audio>