网页设计之路(2)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="/html/csstest1.css" >
</head>

<body>

<p> <a href="#tips">News headline 2</a> </p>
<h1>NEWS WEBSITE</h1>
<p>some text. some text. some text...</p>
...

<div class="news">
<h2> News headline 1</h2>
<p>some text. some text. some text...</p>
...
</div>

<h2> <a name="tips"> News headline 2 </a> </h2>
<p>some text. some text. some text...</p>


...
<a href="test1.html"> 这是本地连接 </a>
<br />
<a href="http://www.microsoft.com/"> 这是网上的连接</a>
<p>
您也可以使用图像来作链接:
<a href="http://www.baidu.com/" target="_self">
<img border="0" height="60" src="../MINE/dc54564e9258d109129f9f61d058ccbf6d814de0.jpg" />
</a>
<br />
</p>
</body>
</html>

这个主要是<div>的一个用法,例子是摘自3wschool.

原文地址:https://www.cnblogs.com/chufengpeng/p/4003294.html