1、html操作思想
使用標籤把要操作的數據包起來,通過修改標籤的屬性值,來實現標籤內數據樣式的變化
2、font標籤 屬性:size 取值範圍 1-7 color:英文單詞,十六進制數 #ffffff
3、標題標籤 <h1></h1>.....<h6></h6> : 從h1到h6越來越小,自動換行
4、註釋 <!-- html的註釋 -->
5、列表標籤
<dl> <dt></dt> <dd></dd></dl>
有序 <ol><li></li></ol>
無序 <ul><li></li></ul>
6、圖像標籤(******)
<img src="圖片的路徑" width="" height="" alt=""/>
alt:瀏覽器兼容性很差
7、路徑(相對路徑)(****)
在同一級目錄 :直接寫
在下一層目錄: images/1.jpg
在上層目錄: …/
8、超鏈接標籤(*****)
<a href="路徑">顯示在頁面上的內容</a>
-打開方式 target="_self _ blank"
默認是在當前頁面打開
9、表格標籤(*****)
<table>
<tr>
<td></td>
<th></th> //加粗和居中
</tr>
</table>
技巧:先數有多少行,數每行裏面有多少個單元格
10、表單標籤(******)
* <form></form>:
- action: 提交到地址
- method:提交方式 :常用的有兩種 get和post
- get和post區別
- enctype屬性(上傳時候使用)
* 輸入項
* 輸入項裏面寫name屬性
* 普通輸入項 <input type="text"/>
* 密碼:<input type="password"/>
* 單選框:<input type="radio"/>
- name值相同
- value值
* 複選框: <input type="checkbox"/>
- name值相同
- value值
* 下拉框
<select name="">
<option value=""></option>
</select>
* 文本域
<textarea cols="" rows="" name=""></textarea>
* 文件 <input type="file"/>
* 提交按鈕 <input type="submit"/>
* 重置 <input type="reset"/>
* 使用圖片提交 <input type="image" src=""/>
* 隱藏項 <input type="hidden"/>
* 普通按鈕 <input type="button"/>
11、div標籤:自動換行 span標籤:在一行顯示
12、框架標籤(會用即可)