HTML常用標籤

來源:互聯網
上載者:User

標籤:index   pac   res   address   下標   style   電腦   時間   劃線   

雙標籤:


HTML的整體結構
<title> </title>
<em></em> 標記
<body bgcolor="blue" text="white" topmargin=value leftmargin/ rightmargin/bottomnargin></body> 主體部分
bgcolor:頁面背景
topmargin=value 不同屬性值來設定顯示內容與閱覽器的距離
text:設定本文顏色


文字與段落
<!-- 備註陳述式-->
<comment>備註陳述式</comment>
<strike>刪除線的文字</strike>
特殊符號: & :&amp 金錢符號:&yen   許可權:&copy 空格:&nbsp
<font face="楷體" size="6" color="#00ffff">實用效果後的文字</font>
<ruby> 文字標註標記
文字
<rt>
文字
</rt>
</ruby>
<b>加粗文字</b>
<i>斜體文字</i>
<u>添加底線文字</u>
<sup>上標內容</sup>
<sub>下標內容</sub>
<address>文字或電子郵箱等地址</address>
<p></p> 段落標籤
<br> 斷行符號
<pre></pre> 預格式化
<center>內容</center> 置中顯示文字
<blockquote>設定段落縮排</blockquote>
<xmp>內容忽略html標記</xmp>
<hr size=3 align=left width="75%" color=""> 插入水平線

 

建立和使用列表
清單類型:
定義列表:dl
<dl>
<dt>名稱
<dd>說明
<dt>名稱
<dd>說明
<dd>說明
</dl>

無序列表:ul
<ul>
<li></li>
<li></li>
</ul>

目錄列表:dir
<dir>
<li></li>
<li></li>
</dir>
菜單列表:menu
<menu>
<li>
<li>
</menu>
有序列表:ol
<ol>
<li></li>
<li></li>
</ol>

 

超連結
<a href="URL">連結內容</a>
<img src="URL" width="" height="" border="0" usemap="#Map"></img>
<map name="Map">
<area shape="rect矩形/circle橢圓/poly多邊形" coords=" , , , " href="URL">
coords表示感應地區的座標
</map>

 

表格的應用
<table width="" height="" border=1 bordercolor="" align="center" frame="" rules="" cellspacing="0" cellpadding="0"> 表格 cellspaceing設定儲存格間距 cellpadding 設定儲存格邊距
<caption>插入表格標題</caption>
<tr>
<th> 表格表頭 例:</th>
<th> 程式設計 </th>
</tr>
<thead>
<tr> 插入一行
<td align="center" valign="middle">&nbsp;</td> 插入一列
<td>&nbsp</td>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" colspan="2"></td> rowspan設定跨行 colspan設定跨列
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
</tr>
</tfoot>
</table>

 

層的應用
<div id="Layerl" style="position:absolute; left:29px; z-index:1; top:12px; width:165px; height:104px; layer-backgroud-color:#666666; border:1px none #000000; visibility: inherit; clip: rect(auto auto auto 41); " > id:定義層的標記/名稱 style:定義層的樣式:position:absolute絕對的定位 layer-backgroud-color:層的背景顏色 z-index層疊

</div>

 

單標籤:
HTML的整體結構

<img src="" width="625px" height="" > 插入圖片
<base href="檔案路徑" target="目標視窗"> 設定基地網址 註:只能有一個並且放在頭部檔案中
<basefont face="宋體" size="2h" color=""> 基準文字 當網頁中文字沒有定義樣式時,就會套用基準文字
<meta http-equiv="expires" name="keywords" content="電腦,英語,數學,語文">
keywords:頁面關鍵字 expires:頁面到期時間
注意:在代碼中,不區分大小寫。

文字與段落

HTML常用標籤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.