<title>My first HTML document</title>
这个时候用浏览器打开文件其实只是一片空白。
2.添加头部和文件
HTML中有6个级别的头字体。H1是最重要的,H2次之,一直到H6
每一个片段都应该有<p>的标签.
<p>This is the second paragraph.</p>
3.增加一些强调
This is a really <em>interesting</em> topic!
但是在这我也不加上<p>的标签,也还是会展示,所以我猜应该是默认的吧?
4.增加图片到你的页面中
<p><img src="text.png" width="200" height="150" alt="My friend Peter"></p>
图片可以指定长宽的像素大小, 也可以增加替换表达,当这个图像不存在的时候(alt)。
longdesc 几乎所有的网页都不支持这个标签了。
5.增加到其他页面的链接
This is a link to <a href="peter.html">Peter‘s page</a>
链接到其他的网页:
This is a link to <a href="http://www.w3.org/">W3C</a>.
你也可以将一个图片链接到一个地址:
<a href="peter.html"><img src="text.png" alt="My friend Peter"></a>
6.三种列表
Html支持三种列表

(2)有序列表 ol
<ol>
</ol>
<html> <head> <title>My first HTML document</title> </head> <body> <h1>An important heading</h1> <h2>A slightly less important heading</h2> <p>This is the first paragraph.</p> This is the second paragraph. This is a really <em>interesting</em> topic! <p><img src="text.png" width="200" height="150" alt="My friend Peter"></p> This is a link to <a href="peter.html">Peter‘s page</a> This is a link to <a href="http://www.w3.org/">W3C</a>. <a href="peter.html"><img src="text.png" alt="My friend Peter"></a> <ul> <li>the first list item</li> <li>the second list item</li> <li>the third list item</li> </ul> <ol> <li>the first list item</li> <li>the second list item</li> <li>the third list item</li> </ol> <dl> <dt>the first term</dt> <dd>its definition</dd> <dt>the second term</dt> <dd>its definition</dd> <dt>the third term</dt> <dd>its definition</dd> </dl> </body> </html>
原文:http://www.cnblogs.com/edenpans/p/6433402.html