html常用标签
<!DOCTYPE html>
<html>
<head>
<title>Learn test html</title>
<meta charset='utf8'/>
<style> p {background-color:red;width:200px;height:40px;position:fixed;bottom:0;right:0}</style>
<link> </link>
</head>
<body>
<div id='d1' >
<p>div 属性</p>
</div>
<form action='#',method='post'>
username:<input type="text" name='name'/><br/>
password:<input type="password" name='password'/><br/>
<input type="button" name='button1' value='提交'/><br/>
<input type="submit" name='submit1' value='提交'/><br/>
<br/>
live:<input type='radio' name='单选框' value='live'>
dead:<input type='radio' name='单选框' value='dead'>
<br/>
<br/>
<input type="checkbox" name='复选框' value='value1'>复选框</input>
<input type="checkbox" name='复选框' value='value2'>复选框1</input>
<br/>
<br/>
<select id='select1' name='start'>
<option>商丘</option>
<option selected>郑州</option>
<option>喀什</option>
</select>
<br/>
<br/>
<textarea id='textarea1' rows='10',cols='30'>
文本框。
</textarea>
</form>
<br/>
<table border='2'>
<caption>表格</caption>
<tr>
<td width='200px'>1</td>
<td>2</td>
<tr>
<tr>
<td width='200px'>3</td>
<td width='200px'>4 </td>
<tr>
</table>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol start="50">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
css样式介绍:
/* 注释内容 */
/* css样式:
有2种选择器:id 和 class
id选择器可以为标有特定的html标签是定样式,html的标签以id属性来设置选择器,css中id选择器以'#'来定义 */
/* id选择器 */
#id{
background-color:red;
width:200px;
height:40px;
position:fixed;
bottom:0;
right:0
}
/* class */
/* calss 选择器用于描述一组元素的样式,class选择器有别于id选择器,class可以在多个元素中使用。class选择器在html 中以class 属性表示,在css 中,类选择器以一个'.'号显示*/
.class {
color:red;
text-align:center;
}
** html使用外部css样式
<!DOCTYPE html>
<html>
<head>
<title>Learn test html</title>
<meta charset='utf8'/>
<link rel="stylesheet" type="text/css" href="css.css"/>
</head>
<body>
<div id='id' >
<p >div 属性</p>
</div>
</body>
</html>