Loading deck
CaelumTian@SIPC115
标准的HTML界面
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML页面</title>
</head>
<body>
<h1>页面标题</h1>
<p>页面正文</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<div CLASS=test>This is a <br> test.</div>
<script type="text/javascript">
alert(1);
</script>
<div class="test">This is a <br/> test.</div>
<script type="text/javascript">
<![CDATA[
alert(1);
]]>
</script>
<meta charset="UTF-8">
<meta name="keywords" content="前端, HTML, CSS, JavaScript">
<meta name="description" content="前端基础教程">
<meta http-equiv="refresh" content="5; url=http://example.com/">
<meta name="robots" content="noindex">
<meta name="format-detection" content="telphone=no, email=no">
<meta http-equiv="Cache-Control"content="no-siteapp"/>
<meta http-equiv="X-UA-Compatible"content="IE=edge,chrome=1"/>
<meta name="renderer" content="webkit">
<p>
这是一个段落
</p>
<p>
这是第二个段落
</p>
<p>
这个段落可以换行<br>
换行之后的结果
</p>
<blockquote cite="http://xxx.html">天才并不是自生自长在深林荒野里的怪物, 是由可以使
天才生长的民众产生、长育出来的,所以没有 这种民众,就没有天才。
</blockquote>
<p>--鲁迅</p>
<p>我最喜欢的一本书是<cite>小王子</cite></p>
<p>使用 cite 标签; 标签来定义作品的标题:</p>
<h1>世界电影票房排行榜</h1>
<ol>
<li>阿凡达</li>
<li>泰坦尼克号</li>
<li>复仇者联盟</li>
</ol>
<h1>购物清单</h1>
<ul>
<li>1个西瓜</li>
<li>2瓶矿泉水</li>
<li>1盒酸奶</li>
</ul>
<h3>霸王别姬</h3>
<dl>
<dt>导演:</dt>
<dd>陈凯歌</dd>
<dt>主演:</dt>
<dd>张国荣</dd>
<dd>张丰毅</dd>
<dd>巩俐</dd>
<dt>上映日期:</dt>
<dd>1993-01-01</dd>
</dl>
<img src="/path/to/img.jpg" alt="替代文字"
width="300" height="200">
<figure>
<img src="/path/to/img.png" alt="替代文字">
<caption>图片标题</caption>
</figure>
<table>
<caption>...</caption>
<thead>
<tr>
<th>...</th>
<th>...</th>
</tr>
</thead>
<tbody>
<tr>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
# type = "color" 颜色输入组
# type = "date" 时间输入组
# type = "email" 邮箱输入组
# ......
<form action="demo_form.asp">
<label for="male">Male</label>
<input type="radio" name="sex" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="sex" id="female" value="female"><br>
<input type="submit" value="Submit">
</form>
1. textarea:定义一个多行输入的文本控件
cols:文本的可见列数 rows:文本可见的行数
2. select:用来创建下拉列表
options:用来创建具体的下拉选项(selectd默认)
<form action="">
<select name="item">
<option value="volvo">前端</option>
<option value="saab">ACM</option>
<option value="fiat" selected>移动端</option>
<option value="audi">后端</option>
</select>
</form>