標籤:c tar a ext color width
初學網頁製作,發現很大一本書概括起來不過是以下一系列的標記,記下這些經常用到的標記和知道怎麼熟練使用就好了,還有其它的用到時再去查
<b></b>粗體
<em></em>斜體 強調
<i></i>斜體 不強調
<strong></strong>強調
<sup></sup>上標標記
<sub></sub>下標標記
<big></big>字型大小
<small></small>
<bdo dir="rtl"></bdo>文字從右至左
<br/>換行
<p></p>
<h1>~<h6>標題
<center></center>文本水平置中標記
<hr/>尺規標記
建立無序列表
<ul>
<li></li>
<li></li>
</ul>
建立有序列表
<ol>
<li></li>
<li></li>
</ol>
自訂欄表
<dl>
<dt></dt>
<dd></dd>
<dd></dd>
<dt></dt>
<dd></dd>
<dd></dd>
</dl>
<p>屬性align屬性值left center right對齊
<img scr="" width= height= alt="圖片提示"/>插入圖片
<body background=""/>將圖片設定為背景
超連結
<a href="" target="_blank"></a> _blank新頁面開啟
連結到同一頁面的不同位置
<a href="#C4"></a>
<h2><a name="C4"></a></h2>
網頁表格的設計
<table border="1">
<tr>
<td></td>
<td></td>
</tr>
</table>
帶有標題的表格
<table border="1">
<caption>標題</caption>
<tr>
<td></td>
<td></td>
</tr>
</table>
<th><th>表頭
設定表格背景
<table border="1" bgcolor="green">
<tr>
<td></td>
<td></td>
</tr>
</table>
定義表格背景圖片
<table border="1" background="">
<tr>
<td></td>
<td></td>
</tr>
</table>
設定儲存格背景
<table border="1">
<tr>
<td background=""></td>
<td></td>
</tr>
</table>
--------------------------------------------
表單基本元素
<form action="url" method="get|post" enctype="mine"></form>
<input type="text" name="" size="" maxlength="" value=""/>
多行文字框輸入
<textarea name="" cols="" rows="" wrap=""></textarea>
選項按鈕
<input type="radio" name="" value=""> 同一組中用同一名稱
複選框
<input type="checkbox" name="" value=""> 同一組中用同一名稱
下拉式功能表
使用select元素可建立多選或單選下拉式功能表
<body>
<select>
<option>列表1</option>
<option>列表2</option>
<option>列表3</option>
</select>
</body>
下拉式功能表select加上 size=""multiple 變成列表框
普通按鈕
<input type="button" name="" value="" onClick="指令碼函數定義行為"/>
提交按鈕
<input type="submit" name="" value=""/>提交表單給action所指向的檔案
重設按鈕
<input type="reset" name="" value=""/>
-------------------------------------
使用HTML建立架構
架構的基本結構
<html>
<head>
<title>架構頁面的標題</title>
</head>
<frameset>
<frame>
<frame>
...
</frameset>
</html>
在使用架構頁面中,body標記被frameset所取代,而對於架構頁面中包含的每一個架構,都通過frame來標記,body和frameset不同時使用
設定視窗架構的基本屬性
水平分割視窗
<framwset rows="架構視窗的高度,架構視窗的高度...">
<frame>
<frame>
...
</frameset>
一般多少個高度對應多少個架構
垂直分割視窗
<framwset cols="架構視窗的寬度,架構視窗的寬度...">
<frame>
<frame>
...
</frameset>
混合分割視窗
<frameset rows="架構視窗的高度,架構視窗的高度...">
<frame>
<frameset cols="架構視窗的寬的..."
<frame>
<frame>
...
</frameset>
<frame>
...
</frameset>
設定架構的邊框
<frame frameborder="value"> 只能為0或1
設定邊框寬度與邊框顏色
<frameset framespacing="邊框寬的" bordercolor="顏色代碼">
設定架構屬性frame
頁面源檔案
<frame src="頁面源檔案地址" name="頁面名稱(不顯示)"/>
<frame src="" noresize/> noresize參數表示架構視窗的尺寸不能改變
邊框與頁面內容的水平邊距
<frame src="" marginwidth="水平邊距"/>設定頁面的左右邊緣與架構邊框的距離,單位是像素
上同,垂直邊距marginheight
<frame scr="" scrolling="是否顯示捲軸"/> 只能是Yes,No,Auto
不支援架構的瀏覽器顯示的內容
<noframe>
</noframe>
內聯架構
<iframe scr="" width="" heigght="" align="" frameborder="" >
</iframe> 主體可用body,frameborder只能去0或1
----------------------------------
網頁多媒體的設計
設定滾動字型
<marquee direction="" behavior="" loop="滾動次數,預設無限" scrollamount=捲動速度 scrolldelay=事件間隔 bgcolor="顏色代碼" >滾動字型</marquee>
direction滾動效果,up,dowm,left right,behavior滾動方式,有scroll,slide,alternate.
設定滾動文字的背景面積
<marquee width= heitht= ></marquee>
單位為像素
設定空白空間
<marquee hspace=水平範圍 vspace=垂直範圍></marquee>
添加背景音樂
<bgsound src="背景音樂的地址" loop=迴圈次數/>
如果希望無限次播放,可將迴圈次數設定為True
添加多媒體檔案(視屏動畫等)
<embed src="多媒體檔案地址" width=播放介面寬度 height=播放介面高度></embed>
寬高一定要設定
設定多媒體檔案的自動運行
<embed src="" autostart=是否自動運行 loop=是否迴圈播放 hidden=是否隱藏></embed>
True和False