标签:
第一天主讲HTML
<!DOCTYPE html>
<html>
<head>
<title>title Web tutorials on HTML, CSS</title>
<meta name="description" content="Web tutorials on HTML, CSS,javascript" />
<!-- 链接外部css文件 -->
<link rel="stylesheet" href="xx.css" type="text/css">
</head>
<body>
<style type="text/css">
/*body {background-color: red}*/
/*css语法 :选择器{属性名1:属性值1;属性名2:属性2; }*/
p {margin-left: 20px}
div#header {background-color:#99bbbb;}
</style>
<table border="1">
<tr>
<td>
<a href="http://www.w3school.com.cn" target="_blank">This is a link target="_blank" 新窗口中打开</a>
<a href="#" target="_blank">空连接</a>
</td>
</tr>
<tr>
<td>
<div id="header"><h1>This is a h1 (使用div#id)</h1></div>
</td>
</tr>
<tr>
<td>
<h2>This is a h2</h2>
</td>
</tr>
<tr>
<td>
<p>This is a paragraph p</p>
</td>
</tr>
<tr>
<td>
<img src="test.jpg">This is a image img</img>
</td>
</tr>
<tr>
<td>
<ul>
<li>无序列表ul</li>
<li>Unordered list</li>
<li>前面带点</li>
<li>li list item 列表项</li>
</ul>
</td>
</tr>
<tr>
<td>
<ol>
<li>有序列表ol</li>
<li>Ordered list</li>
<li>前面带序号</li>
</ol>
</td>
</tr>
<tr>
<td>
<dl>
<dt>自定义列表dl</dt>
<dd>Definition list</dd>
<dt>定义标题dt Definition title</dt>
<dd>定义描述dd Definition description</dd>
</dl>
</td>
</tr>
</table>
<form>
<table border="1">
<tr>
<th>Heading</th>
<th>Another Heading</th>
</tr>
<tr>
<td> 文本text
<input type="text" name="lastname" /></td>
<td> 密码框password
<input type="password"></td>
</tr>
<tr>
<td><input type="submit" value="submit" /></td>
<td><input type="reset" value="reset"></td>
</tr>
<tr>
<td><input type="hidden">隐藏域hidden</td>
<td><input type="radio" name="sex" value="male" /> 单选按钮
<br />
<input type="radio" name="sex" value="female" /> radio</td>
</tr>
<tr>
<td><input type="checkbox" name="bike" />复选框
<br />
<input type="checkbox" name="car" />
checkbox</td>
<td>
<select>
<option>check
<option selected>下拉列表option
<option>Cherries
</select></td>
</tr>
<tr>
<td><textarea >文本域textarea</textarea></td>
<td><!-- this is comment -->注释comment</td>
</tr>
<tr>
<td><label>标签label</label></td>
<td><button>按钮button</button></td>
</tr>
</table>
<table border="1" frame="box" cellspacing="10" cellpadding="5" >
<caption style="background-color:green; color:red;">这里有个标题</caption>
<tr>
<td>单元格间距cellspacing</td>
<td>设置为10</td>
</tr>
<tr>
<td>单元格边距cellpadding</td>
<td>设置为5</td>
</tr>
<tr>
<td>边框选择frame</td>
<td>box above below hsides vsides</td>
</tr>
<tr>
<td colspan="2">colspan="2" 占用两列 rowspan="2"占用两行 </td>
</tr>
</table>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/linkarl/p/5142036.html