C#学习笔记8:HTML和CSS基础学习笔记

<!--

1、<P>...</P>段落标签

2、<br/>折行标签。

3、<img src="" height="*px" width="*px" alt="图片描述">。

注意:不能写成<img ></img>的形式。

4、html注释:<!-- -->

5、字体标签:<font size="7" color="red" >文字内容</font>

其中字体大小size的取值范围是1-7.

6、<pre></pre>讲内容原样输出,通常与<code></code>一起用。

7、<a></a>标签的用法

1、超链接<a href="http://www.baidu.com" target="_blank">百度</a>

Target的值:_self在当前页打开,_blank在新开的网页打开。

Target自定义值,用于跳转到某个指定的位置。

2、从网页的最上面跳到最下面,从最下面跳到最上面。

<a name="最上面" href="#最下面">到最底部</a>

<a name="最下面" href="#最上面">到最顶部</a>

3、从本地一个网页跳到另一个网页的指定位置。

<a href="3.html#A位置">跳到html3的A位置</a>

8、meta标签的用法

<meta name="keywords" content="关键词1,关键词2...">

<meta name="description" content="这里是该网页的描述">

9、

Ul li无序列表 type=“circle”、“square”

Ol li 有序列表 type=“a/1/A/I”

10、表格

<table>

<tr>行

<td>列</td>

</tr>

</table>

11、colspan跨行 rowspan 跨列,<th></th>单元格文字加粗 替换<td></td>

12、<caption></caption> 表格标题标签,写在<table>下面,<tr>标签的上面。

13、cellpadding:内容与边框间隔,cellspace:设置单元格间距。

14、Bgcolor:背景颜色,bordercolor:边框颜色

15、Bordercolorlight:边框高亮

16、提交给服务器的数据都要放在表单<form></form>里面

17、Input标签

<input type="text" name=""/> 一个文本框

<input type="submit" name="" value="提交"> 一个名叫提交的按钮。

18、get/post

<form method="post" action="http://www.baidu.com"></form>

19、分区

<fieldset >

<legend>。。。</legend>

</fieldset>

20、下拉

<select>

<option>河北</option>

</select>

<optground label="河北">

<option> </option>

<optground>

21、CSS

1、标签选择题 直接写标签名

2、类选择器 class="pp" css使用 .pp{}

3、ID选择器 css使用 #pp2{}

22、脱离文档流:position:absolute。