HTML和CSS

來源:互聯網
上載者:User

標籤:設定   標題   ini   txt   use   註冊   content   字型類   hidden   

今天講的HTML和CSS

HTML講的表格和表單

<table></table>表格

<tr></tr>行

<td><td/>列(一行兩列)

文本輸入

文字框<input type="txt" name="" id="" value=""

密碼框<input type="password" name="" id="" value""/>

文本域<textarea name="" id="" cols""(字元多少) rows=""(幾行高)></textarea>

隱藏欄位<input type="hidden" name="" id="" value=""/>

按鈕

提交按鈕<input type="submit"name="" id="" value=""/>

重設按鈕<input type="reset" name="" id="" value=""/>

選擇輸入

選項按鈕組<input type="radio" name="" checked="checked" value=""/>  checked(設定預設選項)

複選框<input type="checkbox" name="" value=""/>

檔案上傳<input type="file" name="" id=""/>

<lable></lable>

下拉式清單方塊

<select name="" size="">

      <option value="值">內容1<option>

      <option value="值" selected="selected">內容2<option> -selected(設為預設)

      <option value="值">內容3<option>

練習題:

答:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>

</head>
<body>
<form>
暱稱:<input type="text" name="" id=""/><br><br>
密碼:<input type="password" name="" id=""/><br><br>
郵箱:<input type="text" name="" id=""/> <select id="" name="">
<option value="1">qq.com</option>
<option value="2">123.com</option>
<option value="3">xxx.com</option>
</select><br><br>
性別:<label>男</label><input type="radio" id="" name="dd">
<label>女</label><input type="radio" id="" name="dd"><br><br>
興趣:<label>旅遊</label><input type="checkbox" id="" name="">
<label>攝影</label><input type="checkbox" id="" name="">
<label>運動</label><input type="checkbox" id="" name=""><br><br>
<table>
<tr>
<td>個人介紹:<br><br><textarea name="" id="" cols="30" rows="5"></textarea></td>
</tr>
</table>
<input type="submit" name=="" id="" value="註冊"/><br><br>
上傳個人照片:<br><br>
<input type="file" name="" id="">

 

CSS的字型樣式和文本樣式

字型樣式:font-family(字型類型)

font-size(字型大小)

font-weight(字型粗細)

font-style(字型傾斜)

color(顏色)

文本樣式:text-decoration(底線、刪除線、頂劃線)

text-indent(段落首行縮排)

text-align(文本水平對齊)

line-height(行高)

underline(底線)

line-through(刪除下)

overline(頂劃線)

練習題:

 

答:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>
<style type="text/css">
#aaa{text-decoration:line-through;}
</style>
</head>
<body>
<img src="file:///C|/Users/Administrator/Desktop/8c1001e93901213fcbf5783d53e736d12e2e9508.jpg" width="200" >
<br>史蒂夫·喬布斯傳果粉致敬經典版典藏套裝(噹噹全國獨家
<p>搶購價:¥116.10</p>
<p id="aaa">定價:¥198.00 </p>

<div>
<img src="u=3863055345,1307926133&fm=26&gp=0.jpg" width="20">
<span>加入購物車</span>
</div>
</body>
</html>

 

HTML和CSS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.