1.HTML是在客户浏览器上显示的,是静态的;
JSP是动态的,且允许包含Java代码,使用URL访问。是在服务器上执行,将结果发送到客户端。
2.第一个jsp文件
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<head>
<title>标题</title>
</head>
<body>
<h1>this is a test</h1>
<h2>Hello World!</h2>
<p>Hello World!</p>
<hr>
<a href="http://www.baidu.com/">百度</a>
<br>
<img src="imgs/test.jpg" width="100" height="100" alt="图片" />
<!-- 不能使用绝对路径,浏览器无法访问用户主机 -->
<!-- alt 当图片显示不出来时,默认显示这个文字,以及帮助视障人群了解内容 -->
<p>下面展示了一个表格</p>
<table border="3">
<tr>
<th>编号</th>
<th>姓名</th>
</tr>
<tr>
<td>1</td>
<td>张三</td>
</tr>
<tr>
<td>2</td>
<td>李四</td>
</tr>
</table>
<b>加粗文本</b>
<i>斜体</i>
<em>强调</em>
<br>
<p> 请按下<kbd>Enter回车</kbd>输入</p>
<pre> 预 格 式 化 文 本 </pre>
<small> 小文本 </small>
<strong> 大文本 </strong>
<br>
<p>HTML 是<abbr title="HyperText Markup Language">超文本标记语言</abbr>的缩写。</p>
<p><bdo dir="rtl">这是从右到左的文本。</bdo></p>
<!-- "rtl"表示从右到左,"ltr"表示从左到右 -->
<address>
联系我们:<a href="mailto:info@example.com">info@example.com</a><br>
地址:123 Example St, Example City
</address>
<blockquote>
<p>引用内容</p>
<footer>引用来源</footer>
</blockquote>
<p>根据 <cite>某某报告</cite> 的内容显示...</p>
<p><del>这是被删除的内容。</del></p>
<p><ins>这是新添加的内容。</ins></p>
<p>H<sub>2</sub>O 是水的化学公式。</p>
<p>x<sup>2</sup> + y<sup>2</sup> = r<sup>2</sup></p>
</body>
</html>
3.速查
<b>粗体文本</b>
<code>计算机代码</code>
<em>强调文本</em>
<i>斜体文本</i>
<kbd>键盘输入</kbd>
<pre>预格式化文本</pre>
<small>更小的文本</small>
<strong>重要的文本</strong>
<abbr> (缩写)
<address> (联系信息)
<bdo> (文字方向)
<blockquote> (从另一个源引用的部分)
<cite> (工作的名称)
<del> (删除的文本)
<ins> (插入的文本)
<sub> (下标文本)
<sup> (上标文本)