HTML常用標簽
<!--下腳標-->
<sub>sub</sub>
<!--上腳標-->
<sup>sup</sup>
<!--段落-->
<p>pp</p>
<!--強調建議用第一種-->
<strong>3333</strong>
<b>bb</b>
<!--斜體建議用第一種-->
<em>111</em>
<i></i>
<!--target="_blank" 新建窗口-->
<a target="_blank">111</a>
<!--跳錨點-->
<ul>
<li><a href="#a1">1111111</a></li>
<li><a href="#a2">22222222</a></li>
</ul>
<!--
標簽的種類:
1.行內元素的標簽,不能獨占一行,不能設置寬高
2.塊狀元素標簽,獨占一行,可以設置寬高
行內塊裝標簽:不能獨占一行,能設置寬高
列:button input
div屬如無語義標簽,用來布局桌面,劃分頁面結構
-->
<!--行內元素-->
<span style="background: antiquewhite">dsaffads
<span style="background: palevioletred">fdsafdas</span>
</span>
<!--塊狀元素-->
<div id="a1" style="background: palevioletred;width: 70%;height: 900px">我是網頁頭部</div>
<div id="a2" style="background: royalblue;width: 70%;height: 900px">我是網頁身體</div>
<div style="background: olivedrab;width: 70%;height: 200px">我是網頁腳部</div>
<!--塊狀元素 按鈕-->
<button >qq</button>
<!--無序列表-->
<ul type="square">
<li>aa</li>
<li>bb</li>
</ul>
<!--title 給圖片加提示-->
<img src="../作業/1.jpg" title="美女">
<!--table 表格 tr行 th表示標題加粗 td表示一個單元格-->
橫向合并 colspen=數值 縱向合并rowspan
align=居左右中
垂直方向:valign=方向
單元格之間的間距cellpadding cellspacing
cellpadding="0" cellspacing="0" 去掉表格邊框線
<table cellspacing>
<thead>頭</thead>
<tbody>體</tbody>
<tfoot>腳</tfoot>
</table>
<iframe src="" name="aa" width="1000" height="1000"></iframe>
<a href="../作業/1.jpg" target="aa"></a>
<!--用來放視頻的標簽-->
<video src="../作業/1.jpg"></video>
<!--用來放音頻的標簽-->
<audio src=""></audio>
<!--表單-->
<!--action 表示提交數據地址-->
<!--mathod 表述數據以什么樣的形式提交-->
<!--get 顯示獲取數據(參數在地址欄上)-->
<!--post 隱式提交數據(參數不在地址欄,參數大小沒有限制)-->
<!--input 是塊狀元素 type指定input的類型 name指定input的名字 value指定input的默認值-->
<form >
<!-- radio 單選框-->
<input type="radio" name="sex" value="m" id="1"><label for="1">男</label>
<input type="radio" name="sex" value="w" id="2"><label for="2">女</label>
<!-- 復選框--><br> checked默認
<input type="checkbox" name="food" value="banana" checked>香蕉<br>
<input type="checkbox" name="food" value="huanggua">黃瓜<br>
<input type="checkbox" name="food" value="qiezi">茄子<br>
<section name="city">
<!-- selected 默認 disabled 無法選中--><!-- 下拉框-->
<option value="beijing" selected>北京</option>
<option value="guangxi" disabled>廣西</option>
<option value="guangdong">廣東</option>
</section>
</form>
<!--文件上傳-->
<form action="" method="post" enctype="multipart/form-data">
頭像<input type="file" name="myfile">
<textarea name="info"></textarea>
<input type="submit" value="提交">
</form>
<!--
placeholder 灰色輸入提示
required 必填
readonly 只能讀不能改 可以提交
disabled 只能讀不能改 不會被提交
size 設置輸入框的大小
maxlength 輸入框最多可以輸多少字符
minlength 輸入框最少可以輸多少字符
autofocus 自動獲取焦點,整個頁面只能有一個
tabindex 設置tab切換順序
-->
HTML head的常用標簽
<!-- 設置字符編碼-->
<meta charset="UTF-8">
<!-- 設置網站標題-->
<title>Title</title>
<!--設置網站圖標-->
<link rel="shortcut icon" type="image/x-icon">
<!-- 抓取關鍵字-->
<meta name="keywords" content="fdhuasu">
設置幾秒后跳轉頁面
<meta http-equiv="refresh" content="3;url=網站地址">
浙公網安備 33010602011771號