html,css基础知识

来源:互联网 发布:数据库原理填空选择题 编辑:程序博客网 时间:2024/05/18 03:03
1.<img src=“url”/>


2.无序<ul></ul>


3.有序<ol></ol>


4.段<p></p>


5.有序排列里的item<li></li>


6.标题<h1></h1>


7.<body style="color:blue; font-size:12px; font-family:Arial"></body>


8.<a href="http://www.google.com">google</a>


9.<a href="http://www.google.com">
<img src=“url”/>
</a>


10.<table>
<thead>
<tr>
<td></td>
</tr>
</thead>


<tbody>
表行(table row)<tr> 
(table data)<td></td>
<td></td>
//在tr里加入两个td就意味着这一行有了两列
</tr>
</tbody>
</table>

11.tbody(table body)


12.thead(table head)


13.对字体加粗<strong></strong>


14.设置斜体<i></i>或者<em></em>


15.divison,分割线<div></div>


16.对部分文字设置属性<span style="color:red">content</span>


17.在html里插入css文件 <head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"></link>
</head>

18.设置表格边距及宽带 table{
border: 1px solid black;
}

19.在三个dive下的,p:   div div div p {
}

20.css里的class表示:.standout {
    
}


21.css里的id表示:#intro {
    
}


22.定义第二个p的属性  p:nth-child(2) {
color: red;
}


23.margin: 1px 2px 3px 4px;(顺时针方向:上,右,下,左)


24.border: 2px solid black;
border-radius: 5px;


25.clear语法:element {
    clear: /*right, left, or both*/
}
0 0
原创粉丝点击