標籤:html標籤 檔案 手寫 frame 印表機 sel 邊框 src txt
1、HTML
Hyper Text Markup Language 超文字標記語言 (HTML)
在HTML當中存在著大量的標籤,我們用HTML提供的標籤,將要顯示在網頁中的內容包含起來。
就構成了我們的網頁。
CSS:控制網頁內容顯示的效果
HTML+CSS=靜態網頁。只有展示功能
JS+Jquery=動態
內容由HTML決定,長成什麼樣由CSS決定
2、開始動手寫HTML頁面
1)、首先在案頭上隨便的建一個檔案。
2)、將建立的檔案的名稱改為.htm/.html
3)、開始寫基本的架構標籤
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
3、HTML標籤
p標籤:段落標籤
 :空格
h#:標題標籤
<!--要注釋的內容-->:注釋符
<img/>:圖片標籤,用來顯示圖片。
src:表示要顯示的圖片的路徑
height:圖片的高度 px
width:圖片的寬度 px
alt:當圖片由於某些原因顯示失敗的時候所顯示的文本
title:當游標移動到圖片上的時候顯示的文本
<hr/>:水平分割線
<br/>:換行
>:>
<:<
&:&
<font></font>:字型標籤 size=1~7 7最大 color=顏色 face=字型系列
<b></b>加粗
<i></i>意大利斜體
<tt></tt>印表機的字型
<u></u>底線
<s></s>刪除線
<sup></sup>上標 勾股定理
<sub></sub>下標
<code></code>代碼
<pre></pre>編輯什麼格式,列印還是什麼 格式
<marquee></marquee>圖片預設從右往左移
<marquee direction="right" behavior=() "slide">從左向右移 移動到邊界停下 很少用了,很多瀏覽器不相容
a標籤:超連結 href表示要串連到的地址 target:開啟新網頁的方式 _blank表示開啟一個新網頁進行跳轉。_self表示在當前頁面進行跳轉
實現頁面內部的跳轉
<a name="底端" href="#頂端">回到頂端</a>
實現頁面間的跳轉
<a href="3.html#碗裡來">快到碗裡去</a>
發送郵件,啟動預設郵件用戶端
<a href="mailto:[email protected]">發送郵件到125944832</a>
4、body當中的屬性
text 文本的顏色
link 超連結的顏色
alink 點擊時超連結的顏色
vlink 點擊後超連結的顏色
bgcolor 背景的顏色
background 背景替換成圖片
5、列表
<ul></ul>無序列表 圓點
<li></li>列表
type="disk" 實心圓點
<ol></ol>有序列表 數字
type="a"從a開始排列
<dl></dl>自訂欄表
<dt></dt>標題
<dd></dd>內容
<th></th>表示表格的標題(加粗)
<td>中的屬性
align valign bgcolor width height colspan rowspan
<dl>
<dt>物件導向</dt>
<dd>封裝</dd>
<dd>繼承</dd>
<dd>多態</dd>
<dt>C#迴圈</dt>
<dd>for迴圈</dd>
<dd>foreach迴圈</dd>
<dd>while迴圈</dd>
<dd>do-while迴圈</dd>
</dl>
6、表格
文法
<table border="1">
<tr>
<td>儲存格內容</td>
</tr>
<tr>
....
</table>
<tr></tr>表示一行
<td></td>表示儲存格內容
cellspacing="0px" 每個儲存格的邊框於外面的邊框的距離
cellpadding="0px" 儲存格內的內容與儲存格邊框的距離
跨行跨列的表格
colspan="2" 跨列 跨2列
<table border="1" cellspacing="0px" cellpadding="0px">
<tr>
<td colspan="2">學產生績</td>
</tr>
<tr>
<td>語文</td>
<td>98</td>
</tr>
<tr>
<td>數學</td>
<td>99</td>
</tr>
</table>
rowspn="2" 跨行 跨2行
<table border="1" cellspacing="0px" cellpadding="0px" height="200px" width="280px">
<tr>
<td rowspan="2">張三</td>
<td>語文</td>
<td>98</td>
</tr>
<tr>
<td>數學</td>
<td>95</td>
</tr>
<tr>
<td rowspan="2">李四</td>
<td>語文</td>
<td>88</td>
</tr>
<tr>
<td>數學</td>
<td>91</td>
</tr>
</table>
7、表單
<form>表單
屬性 action 表示要把裡面的資料提交到伺服器的路徑
method 表示要提交這些資料的形式
get 預設,以url提交,就是以地址欄的方式提交
<form action="www.baidu.com" method="get"> </form>
<input/>
屬性
type 類型
type="text"文字框
type="password"密碼
type="submit"提交 提交名改 value="提交資料"
type="reset" 重設 value="清空"
name="txtName" name="txtPwd" 需要給文字框和密碼框賦值name、否則不能跳轉顯示在地址欄上
type="radio" 單選 name="sex" name="married" 可以給他們分組
type="file" 開啟檔案
<fieldset> 欄位集
<legend>性別</legend> fieldset 元素的其餘內容的標題
</fieldset>
<select> 下拉式清單
size="2" 下拉式清單預設顯示2個
<optgroup label="河北省"></optgroup>選項組
<option></option>選項
</select>
<textarea></textarea> 文字框
cols 和rows屬性來規定textarea的尺寸
cols規定文本區的可見寬度
rows規定文本區的可見行數
<form action="http://www.baidu.com" method="get">
使用者名稱:<input type="text" name="txtName"/><br/>
密碼:<input type="password" name="txtPwd"/><br/>
<input type="submit" value="提交到百度"/>
<input type="reset" value="清空"/><br/>
<fieldset>
<legend>性別</legend>
<input type="radio" name="sex"/>男<br/>
<input type="radio" name="sex"/>女<br/>
</fieldset>
<fieldset>
<legend>婚姻狀況</legend>
<input type="radio" name="married"/>已婚<br/>
<input type="radio" name="married"/>未婚<br/>
</fieldset>
<select size="1">
<optgroup label="河北省">
<option>石家莊</option>
<option>滄州</option>
<option>保定</option>
<option>廊坊</option>
</optgroup>
<optgroup label="河南省">
<option>鄭州</option>
<option>駐馬店</option>
<option>洛陽</option>
<option>新鄉</option>
</optgroup>
<optgroup label="湖北省">
<option>武漢</opt ion>
<option>黃岡</option>
<option>黃石</option>
<option>十堰</option>
</optgroup>
<optgroup label="湖南省">
<option>長沙</option>
<option>嶽陽</option>
<option>衡陽</option>
<option>益陽</option>
</optgroup>
</select><br/>
<input type="file"/><br/>
<textarea cols="100" rows="30">
合約內容
</textarea>
</form>
8、Div+Span
能夠熟練掌握css+div布局
<div>層級元素,這一行只允許我的存在,不允許其他元素存在 布局
<span>不是獨佔一行的標籤,一般用來設定字型 樣式
承載頁面不能用<body>標籤,要用<frameset>
noresize 不移動框線位置
C#基礎筆記(第十八天)